Add example for starting cds with ts-node

This commit is contained in:
Christian Georgi
2021-06-04 14:30:12 +02:00
parent 5e3258913e
commit e8d08d039e
4 changed files with 27 additions and 4 deletions

View File

@@ -2,6 +2,7 @@
"name": "@capire/hello-world",
"version": "1.0.0",
"scripts": {
"watch": "cds serve world.cds"
"watch": "cds serve world.cds",
"watch:ts": "npx ts-node ../node_modules/@sap/cds/bin/cds serve world.cds"
}
}
}

5
hello/world.ts Normal file
View File

@@ -0,0 +1,5 @@
module.exports = class say {
hello(req: any) {
return `Hello ${req.data.to} from a typescript file!`
}
}