Run two tasks/scripts that both "hog the terminal"

77 views Asked by At

I'm trying to setup json-server and browser-sync to work as npm script. I tried to run them seperately and that works fine, however, at the end, both json-server and browser-sync does "hog the terminal" for their cycle. I did put the gulp serve first and it triggers that but does not continue to json-server. Any ideas how to solve to run both commands at one npm script?

I tried both this

1:

"dev": "json-server --watch db.json --port 4200" && gulp serve"

2:

"predev": "json-server --watch db.json --port 4200",
"dev": "gulp serve"

runnit it npm run dev

0

There are 0 answers