Sending command line arguments to npm script
The scripts
portion of my package.json
currently looks like this:
"scripts": {
"start": "node ./script.js server"
}
...which means I can run npm start
to start the server. So far so good.
However, I would like to be able to run something like npm start 8080
and have the argument(s) passed to script.js
(e.g. npm start 8080
=> node ./script.js server 8080
). Is this possible?