0

I have an app I'm working and to start the dev environment I have to run the node server and then the start the Vue environment. I'm trying to make a simple bash script that does the following:

  • navigate to server folder and start the server with the command "yarn start"
  • navigate to client folder and start the Vue environment with "yarn start"
  • open my browser in localhost:8080

The problem I'm facing is that I'm not sure how to make a script that can run two processes. If I start the server, the terminal window will show "active on localhost:3000" and I won't be able to execute more code in that instance. I know how to make a script to start the server, but how can I open a new terminal instance to star the client app?

Showner91
  • 115
  • 2
  • 11
  • What you need is called "running a command in the background". You append the `&` char at the end of the cmd line. That command will be run in the background and the next line of the script will be processed. You won't need that "feature" for your `cd` commands. see https://stackoverflow.com/questions/19543139/bash-script-processing-limited-number-of-commands-in-parallel . Good luck. – shellter May 06 '19 at 13:07
  • Thanks! That did the trick – Showner91 May 06 '19 at 15:54

0 Answers0