A console command as simple as it gets. Just put "keeprunning" before any other command and it will keep your command running. If your command exits for any reason, it will be immediately restarted.
Install via NPM with:
npm install -g keeprunning
Just put keeprunning
before any command. Like... keeprunning ./my-server-thingy
That's it. Really.