PM2 is a great tool for mananging LabShare API services. Install it globally using npm i -g pm2
.
Run:
echo -e '#!/bin/bash\nlsc services start' > devstart.sh && echo 'devstart.sh' >> .git/info/exclude
lsc services start
- Note: line #2 of devstart.sh could be replaced by any command that starts LabShare services via the terminal
The script can then be started via pm2 start devstart.sh --watch && pm2 logs
and stopped with pm2 delete devstart.sh
.
The sample-services.json file can be used as an example PM2 configuration file for LabShare services. Reference PM2 as a Windows service for a Windows-specific services.json
.