Skip to content

Commit 1b0bb15

Browse files
authored
feat: add local debugging to node.js templates (#132)
This commit adds nodemon and an `npm run debug` command to the Node.js templates to support debugging on localhost.
1 parent fae27da commit 1b0bb15

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

pkged.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

templates/node/events/package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@
99
},
1010
"scripts": {
1111
"test": "node test/unit.js && node test/integration.js",
12-
"local": "npx @redhat/faas-js-runtime ./index.js"
12+
"local": "npx @redhat/faas-js-runtime ./index.js",
13+
"debug": "nodemon --inspect ./node_modules/@redhat/faas-js-runtime/bin/cli.js ./index.js"
1314
},
1415
"devDependencies": {
1516
"@redhat/faas-js-runtime": "0.2.3",
17+
"nodemon": "^2.0.4",
1618
"cloudevents": "^3.1.0",
1719
"supertest": "^4.0.2",
1820
"tape": "^4.13.0"

templates/node/http/package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@
55
"main": "index.js",
66
"scripts": {
77
"test": "node test/unit.js && node test/integration.js",
8-
"local": "npx @redhat/faas-js-runtime ./index.js"
8+
"local": "npx @redhat/faas-js-runtime ./index.js",
9+
"debug": "nodemon --inspect ./node_modules/@redhat/faas-js-runtime/bin/cli.js ./index.js"
910
},
1011
"keywords": [],
1112
"author": "",
1213
"license": "Apache-2.0",
1314
"devDependencies": {
1415
"@redhat/faas-js-runtime": "0.2.3",
16+
"nodemon": "^2.0.4",
1517
"supertest": "^4.0.2",
1618
"tape": "^5.0.1"
1719
}

0 commit comments

Comments
 (0)