I am making a shell script that starts the frontend and backend development servers for my node app. This means starting one server, opening a new tab, and starting the other.
The problem with my current script is that when it starts one server, the script seems to exit.
On its own, the command to open a new tab in the VS Code terminal, using osascript
works.
Here is my current implementation of the script:
#!/bin/bash
...
cd $backend_dir && npm run dev
osascript -e 'tell application "System Events" to keystroke "`" using {control down, shift down}' # on its own this opens a new terminal tab
cd $frontend_dir && npm start
Is there a way to accomplish what I want?