Score:0

How to run / start NodeJs on Ubuntu on reboot

no flag

i have a developer system running on Ubuntu 20 LTS which resides on a VM Host and it works fine. But sometimes we have some maintenance on the Host which means the VM will go down and come backup. So i am looking for a way to startup nodeJs once the host has rebooted.

Here are a few issues..

A) As we have a SSL Cert on server it seems me to require to start the nodeJs server with sudo if i dont it throws the following error

events.js:174 throw er; // Unhandled 'error' event ^ Error: listen EACCES: permission denied 192.168.1.111:443 at Server.setupListenHandle [as _listen2] (net.js:1263:19)

i already changed the crt and key file to 644 and the user and group to the nodejs user i created but with no luck

b) i would like to start it with screen so that i can atach later to that terminal session for debug and monitoring.

I hope someone has some insight to help me make this work

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.