I have the MEAN stack Ubuntu setup. I have nginx set up and redirecting the port 80 request to localhost port 3000. When I run the grunt command in the /opt/mean/ folder it works fine, the website loads etc.
The question is, how do I leave this to run as a background process? As at the moment once I close my terminal window the grunt task is ended.
Any help is much appreciated :)
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
This isn’t hard to get working. You can use screen for this, if you haven’t got this already install it with:
sudo apt-get install screen
After this is done, you can run a screen (background window) with
screen -S nameofscreen
This will make a new screen, with a handy name. Now inside you can do your commands so it will run there. Once done, hit CTRL + a and then d. This will detach you from the screen, and keep it running in the background.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.