Skip to content

Instantly share code, notes, and snippets.

@axross
Last active August 29, 2015 14:05
Show Gist options
  • Save axross/c9f4d7676964fbf9c48a to your computer and use it in GitHub Desktop.
Save axross/c9f4d7676964fbf9c48a to your computer and use it in GitHub Desktop.
{
"name": "myapp"
"scripts": {
"start": "node app.js",
"production": "NODE_ENV=production node app.js"
}
}
{
"name": "myapp"
"scripts": {
"start": "node app.js",
"production": "NODE_ENV=production node app.js"
}
}
npm run-sctipt production
npm run-sctipt production
{
"name": "myapp"
"scripts": {
"start": "node app.js"
},
"config": {
"port": "8080"
}
}
npm run production
http.createServer(function() {
;
}).listen(process.env.npm_package_config_port);
{
"name": "myapp"
"scripts": {
"start": "node app.js"
},
"config": {
"port": "8080"
}
}
npm config set myapp:port 80
http.createServer(function() {
;
}).listen(process.env.npm_package_config_port);
npm config set myapp:port 80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment