2

For example, I want to run two commands by npm scripts, the first command starts a node server. I find that the first command executed success but the first command stops the second command to execute.How can I do to execute these two commands successfully?

package.json

"scripts": {
    "dev": "nodemon ./bin/www & gulp dev"
  }

nodemon ./bin/www starts a node server and the gulp dev does not execute.

enter image description here

ChenLee
  • 1,371
  • 3
  • 15
  • 33

1 Answers1

1

Just use & to say run this command & this command

"scripts": {
  "start": "commandA --arguments whatever & commandB params --arguments"
}
Gaurav Bharti
  • 1,065
  • 1
  • 14
  • 22