Deploying Node.js code as single executable/runtime
Deploying projects as single file executable is very easy and robust way of code deployment. Node.js code can also be deployed as single executable using makeself utility on Unix.
Way to follow is
- cd <your_project_directory>
- npm install
- cp `which node` .
- echo "./node index.js">>run.sh
- cd ..
- makeself <your_project_directory> <exe_name> <version> ./run.sh
If every thing goes as expected, you should have <exe_name> file in your working directory which can be run as ./<exe_name> to run the code
I will test it! Thanks!