Can now step-through debug with nodemon

This commit is contained in:
Daniel Lugo 2021-04-23 11:21:12 -04:00
parent 91d4017f47
commit 3c31f718bf
4 changed files with 422 additions and 356 deletions

23
.vscode/launch.json vendored
View file

@ -1,14 +1,31 @@
{ {
"configurations": [ "configurations": [
{ {
"name": "Launch Program", "name": "Launch Program Via Nodemon",
"program": "${workspaceFolder}/main.js", "program": "${workspaceFolder}/main.js",
"args": ["-h", "0.0.0.0", "-c"], "args": ["--", "-h", "0.0.0.0", "-c"],
"request": "launch", "request": "launch",
"skipFiles": ["<node_internals>/**"], "skipFiles": ["<node_internals>/**"],
"type": "node", "type": "node",
"envFile": "${workspaceFolder}/.env", "envFile": "${workspaceFolder}/.env",
"outputCapture": "std" "outputCapture": "std",
// https://code.visualstudio.com/docs/nodejs/nodejs-debugging#_restarting-debug-sessions-automatically-when-source-is-edited
// Tip: Pressing the Stop button stops the debug session and disconnects
// from Node.js, but nodemon (and Node.js) will continue to run. To stop
// nodemon, you will have to kill it from the command line (which is
// easily possible if you use the integratedTerminal as shown above).
// Tip: In case of syntax errors, nodemon will not be able to start
// Node.js successfully until the error has been fixed. In this case, VS
// Code will continue trying to attach to Node.js but eventually give up
// (after 10 seconds). To avoid this, you can increase the timeout by
// adding a timeout attribute with a larger value (in milliseconds).
"runtimeExecutable": "${workspaceFolder}/node_modules/nodemon/bin/nodemon.js",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"restart": true
} }
] ]
} }

6
nodemon.json Normal file
View file

@ -0,0 +1,6 @@
{
"watch": ["src/", "services/", "utils/", "constants/", "config/"],
"ignore": ["node_modules/", ".git", "radata/", ".storage/", "*.log.*"],
"verbose": true,
"ext": "js"
}

View file

@ -87,7 +87,7 @@
"eslint-plugin-prettier": "^3.1.4", "eslint-plugin-prettier": "^3.1.4",
"jest": "^24.9.0", "jest": "^24.9.0",
"lint-staged": "^10.2.2", "lint-staged": "^10.2.2",
"nodemon": "^1.19.3", "nodemon": "^2.0.7",
"prettier": "^1.18.2", "prettier": "^1.18.2",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"ts-node": "^9.1.1", "ts-node": "^9.1.1",

747
yarn.lock

File diff suppressed because it is too large Load diff