This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function connectToDb() { | |
console.log('made a connection to database'); | |
return "dbConnection"; | |
} | |
var connection = connectToDb(); | |
var dbQueryWithoutClosure = function (queryParam) { | |
// var connection = connectToDb(); | |
console.log('request without closure param: ' + queryParam + ' to db with connection: ' + connection); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/usr/local/bin/node /usr/local/lib/node_modules/npm/bin/npm-cli.js run-script server:dev | |
To debug the "server:dev" script, make sure the $NODE_DEBUG_OPTION string is specified as the first argument for the node command you'd like to debug. | |
For example: | |
{ "start": "node $NODE_DEBUG_OPTION server.js" } | |
> angular2-webpack-starter@5.1.1 server:dev /home/cant/Projects/angular2-webpack-starter | |
> webpack-dev-server --config config/webpack.dev.js --progress --profile --watch --content-base src/ | |