diff --git a/hello/package.json b/hello/package.json new file mode 100644 index 00000000..3282f8bf --- /dev/null +++ b/hello/package.json @@ -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" +} \ No newline at end of file diff --git a/hello/test.http b/hello/test.http new file mode 100644 index 00000000..e3ab0a6f --- /dev/null +++ b/hello/test.http @@ -0,0 +1 @@ +GET http://localhost:4004/say/hello(to='world') diff --git a/hello/world.cds b/hello/world.cds new file mode 100644 index 00000000..54bf59fa --- /dev/null +++ b/hello/world.cds @@ -0,0 +1,3 @@ +service say { + function hello (to:String) returns String; +} diff --git a/hello/world.js b/hello/world.js new file mode 100644 index 00000000..ff1a370e --- /dev/null +++ b/hello/world.js @@ -0,0 +1,3 @@ +module.exports = class say { + hello(req) { return `Hello ${req.data.to}!` } +} diff --git a/reviews/package.json b/reviews/package.json index bb996e51..d1142aad 100644 --- a/reviews/package.json +++ b/reviews/package.json @@ -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" } \ No newline at end of file