Skip to content

Commit 4f635a2

Browse files
author
hirsch
committed
✨ Add debugging to the serve task
1 parent b1856d8 commit 4f635a2

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

.vscode/launch.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@
1717
"env": {
1818
"NODE_ENV": "production"
1919
}
20+
},
21+
{
22+
"type": "node",
23+
"request": "attach",
24+
"name": "Nodemon Debug",
25+
"port": 9229,
26+
"restart": true
2027
}
2128
]
2229
}

nodemon.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"delay": "0",
33
"execMap": {
4-
"ts": "ts-node"
4+
"ts": "node -r ts-node/register"
55
},
66
"events": {
77
"start": "tslint -c ./tslint.json -t stylish 'src/**/*.ts'"

package-scripts.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ module.exports = {
1818
* Serves the current app and watches for changes to restart it
1919
*/
2020
serve: {
21+
inspector: {
22+
script: series(
23+
'nps banner.serve',
24+
'nodemon --watch src --watch .env --inspect'
25+
),
26+
description: 'Serves the current app and watches for changes to restart it, you may attach inspector to it.'
27+
},
2128
script: series(
2229
'nps banner.serve',
2330
'nodemon --watch src --watch .env'

0 commit comments

Comments
 (0)