I
I
Ivan Pavlenko2017-03-20 21:12:22
Node.js
Ivan Pavlenko, 2017-03-20 21:12:22

Passing options to npm start?

I'm trying to run a script with a parameter including the sign -
npm start -id 123
-id disappears for some reason :( I
run node index.js -id 123 everything is fine
in package.json
"scripts": {
"start": "node index.js"
}
The question is, how can it be?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Konstantin Kitmanov, 2017-03-20
@MrGobus

Everything is simple really npm start -- -d 123:. Same with other npm scripts, of course.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question