See the last comment on that article (June 6th posted by Tejas Manohar, starts with “#!/bin/sh”). I thought it might be better fit for a community question rather than a comment.
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!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hi, <br> <br>Just to be clear, there are two problems? Starting your app with forever and cron on reboot isn’t working and static files are 404? <br> <br>First off, to serve the static files, you need to set the root directory in the server block to point to where they are. Something like: <br> <br><pre> <br>server { <br> listen 80; <br> <br> server_name your-domain.com; <br> root /var/www/your-domain.com/html/app/public; <br> <br> location / { <br> proxy_pass http://localhost:{YOUR_PORT}; <br> proxy_http_version 1.1; <br> proxy_set_header Upgrade $http_upgrade; <br> proxy_set_header Connection ‘upgrade’; <br> proxy_set_header Host $host; <br> proxy_cache_bypass $http_upgrade; <br> } <br>} <br></pre> <br> <br>As for the starting the app on reboot, let’s try to narrow down the problem. Can you start the app with forever just by itself: <br> <br><pre> <br>forever start --sourceDir /var/www/[your domain]/html/app/app app.js <br></pre> <br> <br>If so, then the problem is with the cron job. In not, then there is a problem with for ever. Could you post any error messages?
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.
Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.
