Added hello world

This commit is contained in:
Daniel
2020-03-02 08:35:31 +01:00
parent c6eb21ec51
commit 125cb6e5c2
5 changed files with 29 additions and 2 deletions

20
hello/package.json Normal file
View File

@@ -0,0 +1,20 @@
{
"name": "@capire/reviews",
"version": "1.0.0",
"description": "A reuse service providing generic means to add reviews and ratings to target objects, e.g. products.",
"repository": "https://github.com/SAP-samples/cloud-cap-samples.git",
"scripts": {
"watch": "cds serve world.cds"
},
"cds": {
"requires": {
"db": {
"kind": "sql"
},
"messaging": {
"kind": "file-based-messaging"
}
}
},
"license": "SAP SAMPLE CODE LICENSE"
}

1
hello/test.http Normal file
View File

@@ -0,0 +1 @@
GET http://localhost:4004/say/hello(to='world')

3
hello/world.cds Normal file
View File

@@ -0,0 +1,3 @@
service say {
function hello (to:String) returns String;
}

3
hello/world.js Normal file
View File

@@ -0,0 +1,3 @@
module.exports = class say {
hello(req) { return `Hello ${req.data.to}!` }
}

View File

@@ -3,7 +3,6 @@
"version": "1.0.0",
"description": "A reuse service providing generic means to add reviews and ratings to target objects, e.g. products.",
"repository": "https://github.com/SAP-samples/cloud-cap-samples.git",
"license": "SAP SAMPLE CODE LICENSE",
"files": [
"db",
"srv",
@@ -21,5 +20,6 @@
"kind": "file-based-messaging"
}
}
}
},
"license": "SAP SAMPLE CODE LICENSE"
}