isaacs/npm — Issue #1543: `npm get port` from package.json
Author: slaskis
Created: 2011-10-12 15:00:52+00:00
State: open

It would be cool if the `npm get` would be able to get it's config from the package.json.

Use case for me is to get the port which is defined in the package.json like

{"config":{"port":8001}}

and then i could do this to test if the app is running (in my deploy.conf):

curl localhost:`npm get port` >/dev/null

alt. I'd have to use `npm get foo:port`, either way it would be useful i think.

I know it's possible to set on a user basis but this way i wouldn't have to login to the server to set it's port...