Skip to content

Instantly share code, notes, and snippets.

@abdulwahidgul24085
Last active February 4, 2021 16:04
Show Gist options
  • Save abdulwahidgul24085/33481e84254c5458fc8f61817b9e12a3 to your computer and use it in GitHub Desktop.
Save abdulwahidgul24085/33481e84254c5458fc8f61817b9e12a3 to your computer and use it in GitHub Desktop.
Nodejs Vscode Debugger and Envfile link
This runs the nodejs with vscode using nodemon for auto refresh on save. For this we need to install nodemon globally with {npm i -g nodemon}
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch server.js via nodemon",
"type": "node",
"request": "launch",
"runtimeExecutable": "nodemon",
"program": "${workspaceFolder}\\_express\\index.js", <- the root file to run the index.js, app.js, or server.js
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"skipFiles": ["<node_internals>/**"],
"envFile": "${workspaceFolder}/_express/.env" <- set a .env files to utilize an external Env files inlcusion.
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment