Answer the question
In order to leave comments, you need to log in
How to pass variable to npm script?
I want to be able to change the server port either by specifying it in the package.json script or by running a command. I have this on a server
npm script
runs anyway on 3090 app.set('port', process.env.PORT || 3090)
"api": "nodemon api/server.js --PORT=7777"
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question