I am trying to create two separate npm commands to start my NodeJS project locally on the dev machine and in production mode. I want to be able to pass arguments to the machine separately to serve the right dependencies - which could be a CDN in production OR my local machine.
Here's what I am looking to have in package.json
"run": "node ./server/app.js", /* for running locally*/
"start": "node ./server/app.js", /* for running in production*/
If I try to call npm run - it creates this error:
npm ERR! npm run-script [<pkg>] <command>
npm ERR! not ok code 0
I also want to be able to send commandline argumentswhich would contain a URL.