Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting concurrently scripts to complete

I am trying to create a script to run an end-to-end testing suite. I am currently using concurrently and the angular cli, like so:

"e2e": "concurrently \"ng e2e --proxy-config proxy.conf.json\" \"cross-env NODE_ENV=development node server\"",

It runs fine, but my issue is that obviously whilst the ng e2e command completes, my backend server does not. Is there any way to get the whole command to finish when the tests are complete?

like image 380
George Edwards Avatar asked Mar 08 '23 21:03

George Edwards


1 Answers

Found it! Concurrently has already thought of this and helpfully implemented the following switches --kill-others --success first.

--kill-others means "if one command completes, kill the other and --success first means "if the first command is successful return a success code for the whole concurrently command.

like image 197
George Edwards Avatar answered Apr 26 '23 08:04

George Edwards