So me and my friends created a small startup and I created a custom todo app for our team. I don’t want to deal with the expenses and struggles that come with uploading an application online, so I thought to myself what if I could copy the project to all 5 computers we are using, and somehow make it so that every time each one of start our computer, both Node backend and React frontend get started automatically without the need to go to vscode and start them manually. this way we all can work with this todo application, even though we haven’t put it online. The problem is that I don’t know wheater this is possible and if it’s possible, I don’t know how. can anyone help me with this?
2
Answers
This is highly dependent on the operating system.
Here is a relevant answer for windows: https://stackoverflow.com/a/76766654/13175658
Here is a relevant answer for mac:
https://stackoverflow.com/a/6445525/13175658
From there, you would have to have the shell script launch your todo app however you’ve architected it to be launched.
To automatically start a Node.js app, I would suggest using PM2 – https://pm2.keymetrics.io/docs/usage/quick-start/.
For Unix based systems (Linux & Mac), you can use the
pm2 startup
option – https://pm2.keymetrics.io/docs/usage/startup/A quick reference for Linux:
For Windows OS, there is a little more effort, which is explained in this answer: https://stackoverflow.com/a/42770772/2136313