Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Configuration for remote debugging
  • Loading branch information
gregorwolf committed Dec 3, 2020
1 parent 3acc9b3 commit e8e0d1b
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
9 changes: 9 additions & 0 deletions .vscode/launch.json
Expand Up @@ -33,6 +33,15 @@
],
"program": "${workspaceFolder}/srv/express",
"cwd": "${workspaceFolder}/srv"
},
{
"type": "node",
"request": "attach",
"name": "Attach cloud app ",
"address": "localhost",
"port": 9229,
"localRoot": "${workspaceFolder}",
"remoteRoot": "/home/vcap/app"
}
]
}
8 changes: 5 additions & 3 deletions package.json
Expand Up @@ -9,7 +9,6 @@
"license": "ISC",
"dependencies": {
"@sap-cloud-sdk/core": "^1.32.1",
"@sap/cloud-sdk-core": "^1.17.2",
"@sap/cds": "^4.3.1",
"@sap/cds-odata-v2-adapter-proxy": "^1.4.58",
"@sap/hana-client": "^2.6.61",
Expand All @@ -20,7 +19,9 @@
},
"scripts": {
"setup": "npm install && npm run build && npm run deploy:local",
"start": "cds run",
"start": "npm run start:cds",
"start:debug": "node --inspect srv/cds.js run",
"start:cds": "cds run",
"start:local": "npm run deploy:local && npm start",
"build": "cds build/all --clean",
"build:cf": "cp mta-cf.yaml mta.yaml && mbt build -p=cf && rm mta.yaml",
Expand All @@ -31,7 +32,8 @@
"deploy:cf": "cf deploy mta_archives/epmbp-consumer-app_0.0.1.mtar -e cf.mtaext",
"deploy:xsa": "xs deploy mta_archives/epmbp-consumer-app_0.0.1.mtar",
"deploy:xsa:user": "xs deploy mta_archives/epmbp-consumer-app_0.0.1.mtar -e xsa.mtaext",
"debug:cf": "cf ssh epmbp-consumer-app-srv -N -T -L 9229:127.0.0.1:9229",
"enable:ssh": "cf enable-ssh epmbp-consumer-app-srv",
"debug:cf": "cf ssh epmbp-consumer-app-srv -N -T -L 9229:localhost:9229",
"undeploy:cf": "cf undeploy epmbp-consumer-app --delete-services --delete-service-brokers"
},
"devDependencies": {
Expand Down
4 changes: 4 additions & 0 deletions srv/cds.js
@@ -0,0 +1,4 @@
// used in launch.json to refer to an installed cds via an absolute path

const cds = require('@sap/cds');
cds.exec();
2 changes: 1 addition & 1 deletion srv/service.js
@@ -1,5 +1,5 @@
const cds = require('@sap/cds')
const { retrieveJwt } = require('@sap/cloud-sdk-core')
const { retrieveJwt } = require('@sap-cloud-sdk/core')

/*
const createFilter = xs => {
Expand Down

0 comments on commit e8e0d1b

Please sign in to comment.