Closed zeke closed 10 years ago
Things would be a bit more DRY in service.json if ndm would read from package.json in the absence of certain properties. Instead of this:
service.json
{ "newww": { "module": "newww", "description": "A total rewrite of npm-www using hapijs", "scripts": { "start": "node server.js" }, "env": { "PORT": "8081" }, "args": {} }, "newww2": { "module": "newww", "description": "A total rewrite of npm-www using hapijs", "scripts": { "start": "node server.js" }, "env": { "PORT": "8082" }, "args": {} }, "newww3": { "module": "newww", "description": "A total rewrite of npm-www using hapijs", "scripts": { "start": "node server.js" }, "env": { "PORT": "8083" }, "args": {} }, "newww4": { "module": "newww", "description": "A total rewrite of npm-www using hapijs", "scripts": { "start": "node server.js" }, "env": { "PORT": "8084" }, "args": {} } }
I would prefer something like this:
{ "newww": { "env": { "PORT": "8081", "NODE_ENV": "PRODUCTION" } }, "newww2": { "env": { "PORT": "8082", "NODE_ENV": "PRODUCTION" } }, "newww3": { "env": { "PORT": "8083", "NODE_ENV": "PRODUCTION" } }, "newww4": { "env": { "PORT": "8084", "NODE_ENV": "PRODUCTION" } } }
For personal reference, these spots in the code are related:
PS This is related to https://github.com/npm/newww/pull/164
I've implemented your suggestions in: https://github.com/npm/ndm/pull/85, really helps clean things up.
Things would be a bit more DRY in
service.json
if ndm would read from package.json in the absence of certain properties. Instead of this:I would prefer something like this:
For personal reference, these spots in the code are related: