pkg allows you to take any of your node projects and bundle them up into standalone apps that you can ship to people or servers that do not have node.js installed. This lesson walks you through installing and using pkg on two simple projects.
Install:
npm i -g pkg
https://www.npmjs.com/package/pkg
index.js:
console.log("hello world")
Run:
pkg index.js --target macos --output hello-wrold
It will output a bash file to run:
./hello-world