Skip to content

Commit

Permalink
feat: add local debugging to node.js templates (#132)
Browse files Browse the repository at this point in the history
This commit adds nodemon and an `npm run debug` command to the Node.js
templates to support debugging on localhost.
  • Loading branch information
lance committed Sep 22, 2020
1 parent fae27da commit 1b0bb15
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkged.go

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion templates/node/events/package.json
Expand Up @@ -9,10 +9,12 @@
},
"scripts": {
"test": "node test/unit.js && node test/integration.js",
"local": "npx @redhat/faas-js-runtime ./index.js"
"local": "npx @redhat/faas-js-runtime ./index.js",
"debug": "nodemon --inspect ./node_modules/@redhat/faas-js-runtime/bin/cli.js ./index.js"
},
"devDependencies": {
"@redhat/faas-js-runtime": "0.2.3",
"nodemon": "^2.0.4",
"cloudevents": "^3.1.0",
"supertest": "^4.0.2",
"tape": "^4.13.0"
Expand Down
4 changes: 3 additions & 1 deletion templates/node/http/package.json
Expand Up @@ -5,13 +5,15 @@
"main": "index.js",
"scripts": {
"test": "node test/unit.js && node test/integration.js",
"local": "npx @redhat/faas-js-runtime ./index.js"
"local": "npx @redhat/faas-js-runtime ./index.js",
"debug": "nodemon --inspect ./node_modules/@redhat/faas-js-runtime/bin/cli.js ./index.js"
},
"keywords": [],
"author": "",
"license": "Apache-2.0",
"devDependencies": {
"@redhat/faas-js-runtime": "0.2.3",
"nodemon": "^2.0.4",
"supertest": "^4.0.2",
"tape": "^5.0.1"
}
Expand Down

0 comments on commit 1b0bb15

Please sign in to comment.