Added hello world
This commit is contained in:
20
hello/package.json
Normal file
20
hello/package.json
Normal 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
1
hello/test.http
Normal file
@@ -0,0 +1 @@
|
||||
GET http://localhost:4004/say/hello(to='world')
|
||||
3
hello/world.cds
Normal file
3
hello/world.cds
Normal file
@@ -0,0 +1,3 @@
|
||||
service say {
|
||||
function hello (to:String) returns String;
|
||||
}
|
||||
3
hello/world.js
Normal file
3
hello/world.js
Normal file
@@ -0,0 +1,3 @@
|
||||
module.exports = class say {
|
||||
hello(req) { return `Hello ${req.data.to}!` }
|
||||
}
|
||||
@@ -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"
|
||||
}
|
||||
Reference in New Issue
Block a user