- For local API development, every time we save code, we have to stop and start debugging mode.
- The compilation and server start takes avg ~2min.
- With hot-reload enablement, the debugging mode does not need to be stopped.
- Every time code is saved, automatic compilation and api server restart will happen.
- Assume a developer spend 1hr a day waiting for compilation. This implementation reduces it to 3min a day, hence saves 95% waiting time.
- Debug mode: 'Attach to Node'.
- Run no debug mode:
npm start
- "WEBSITE_CONTENTAZUREFILECONNECTIONSTRING"
- "WEBSITE_CONTENTSHARE"
- "WEBSITE_ENABLE_SYNC_UPDATE_SITE"
- "WEBSITE_NODE_DEFAULT_VERSION"
- "WEBSITE_RUN_FROM_PACKAGE"
- /.vscode/launch.json
"configurations": [
{
"name": "Attach to Node Functions",
"type": "node",
"request": "attach",
"port": 9229,
"preLaunchTask": "func: host start",
"restart": true
}
]
- /.vscode/tasks.json
"tasks": [
{
"type": "shell",
"label": "npm build",
"command": "npm run watch",
"dependsOn": "npm install",
"problemMatcher": "$tsc-watch",
"isBackground": true
}
]