Have more advantage if you make an executable file the Node.js application that can be run even on devices without Node.js installed. Use cases are below,
- Able to use the commercial version of your package without the source code.
- don't want to execute the command npm install to install dependencies
- Executable file is portable you can execute anyware
- This can support corss-platfrom and runs in different platfrom
Using the PKG Node module able to convert exe format. Lets we do the following steps on your Linux machine.
$ npm install -g pkg
$ pkg server.js --targets node8-linux-x64
$ /usr/bin/pkg .
$ /usr/bin/pkg --targets exe_name
Comments (0)