Answer the question
In order to leave comments, you need to log in
How to correctly describe the launch of scripts?
How to run scripts from two different directories at the same time?
"scripts": {
"start": "node server",
"build": "client/ npm run build",
"dev": "nodemon server&&client/ npm start"
},
Answer the question
In order to leave comments, you need to log in
I usually use the npm-run-all package ( https://github.com/mysticatea/npm-run-all ) for different scripts
to shorten the dev script entry to run-p devserver build
where
devserver is nodemon server.
+ it is cross-platform.
And to run on the desired path:npm run build --prefix client/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question