Simplify hello world sample

This commit is contained in:
Daniel Hutzel
2024-07-16 15:28:27 +02:00
parent b8d389a40a
commit 722cf622eb
4 changed files with 8 additions and 14 deletions

View File

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

View File

@@ -1,10 +0,0 @@
const cds = require ('@sap/cds')
describe('Hello world!', () => {
const {GET} = cds.test.in(__dirname,'../srv').run('serve', 'world.cds')
it('should say hello with class impl', async () => {
const {data} = await GET`/say/hello(to='world')`
expect(data.value).to.match(/Hello world.*typescript.*/i)
})
})

View File

@@ -1 +1,5 @@
GET http://localhost:4004/say/hello(to='world')
GET http://localhost:4004/odata/v4/say/hello
###
GET http://localhost:4004/odata/v4/say/hello(to='me')
###