I would like to create an executable bash file that will execute the command
node app.js - the goal is to have an executable file that can be opened on a local machine on which node is already installed and the executable is inside the project directory (It's an express.js app).
I'm trying to do it on a mac, I've written a .command file, made it executable and added the command.
Problem is, the process immediately closes, as the terminal seems to automatically add exit; after the last command.
I would like to do it on Windows machines also.
I don't need the entire app in an executable file, only the option to double click a file instead of opening the terminal and manually writing that simple command.
Any idea how to achieve this?
nohup node app.js &instead. But it'll make a nohup file with the console output written in it for debug purpose. I don't know how to do without creating that file ^^ (maybe a nohup flag)