I have an nodejs http server:
var http = require('http');
var server = http.createServer(function(req, res) {
res.writeHead(200, { 'Content-Type': 'text/plain' });
res.end("hello world!\n");
});
server.listen(3555)
I do not use Phusion Passenger, I reserve my own port 3555
I can use nohup node server.js & to run the server.
But the server may crash sometime. the nohup node server.js & method can not restart the server when crash. I want to ask whether there are similar stuff in serv00 like restart=always in systemd?