on 2020 May 19 3:16 AM
Hi ,
How to control OData service version generated using SAP Cloud Application Programming Model ?
Thank you ,
Hi idman,
In Node.js, you can add a v2 proxy (cf. https://developers.sap.com/tutorials/cap-cloudsdk-2-v2-adapter.html).
Best,
Sebastian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello vansyckel,
Thank you for your answer, please how can I add v2 proxy to my CAPM project and where ?
Should I create a file server.js like it is showing in this tutorial https://developers.sap.com/tutorials/cap-cloudsdk-2-v2-adapter.html ,
Regards,
Mariam
Hi idman,
Yes, either that or you can also use our newer bootstrapping features as described in https://cap.cloud.sap/docs/releases/feb20#support-for-local-serverjs and would result in something like below.
Best,
Sebastian
// local ./server.js
const cds = require('@sap/cds')
const odatav2proxy = require('@sap/cds-odata-v2-adapter-proxy')
let app
cds.on('bootstrap', a => {
app = a
})
cds.on('serving', () => { // > invoked before app.listen
app.use(odatav2proxy({ port: <port> }))
})
module.exports = cds.server // > delegate to default server.js
Thank you vansyckel it works !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
70 | |
10 | |
10 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.