I wrote a blog post on this here:
http://www.alexjamesbrown.com/blog/development/create-a-standalone-exe-to-run-a-node-js-application/
In case my blog should ever disappear:
Download Advanced BAT to EXE converter
http://www.battoexeconverter.com/
Download Node.exe from Joyent (I'm using 0.8.2 since this post is 5+ years old)
http://nodejs.org/dist/v0.8.2/node.exe
Now we’re ready to bundle the node.js executable and our js files into a single exe file.
Create a BAT file
CD %MYFILES%/
node test.js
%MYFILES% is the variable given to the location of embedded files (more on that in a sec)
For the purposes of this demo, I’ve created a very simple test.js file, that looks like this:
for(i=1;i<=10000;i++) {
console.log(i);
}
Now, from the File menu of BAT to EXE converter, select Build Exe (CTRL+ B)
Enter a filename for the final exe file.
Next, the EXE options pane will be displayed.
![enter image description here]()
Click the Embed Files tab, and select both your node.exe and test.js files.
Set any other options you feel you’ll need here.
Then, simply click Build EXE.
Your executable will be bundled and in the location you chose to save it.
Run it, and you’ll have 1-10000 outputted into the console.