How to make exe files from a node.js app?

exe, javascript, node.js, windows

Solution

There a few alternatives, both free and commercial. I haven't used any of them but in theory they should work:

- Iexpress (native windows tool)

- Quick Batch File Compiler (commercial)

- BoxedApp Packer

- "Advanced" Batch To EXE Converter" (freeware)

Most will require you to keep the batch file as main executable, and then bundle node.exe and your scripts.

Depending on your script, you also have the option to port it to JSDB, which supports an easy way to create executables by simply appending resources to it.

A third quasi-solution is to keep node somewhere like `C:\utils` and add this folder to your `PATH` environment variable. Then you can create .bat files in that dir that run node + your preferred scripts - I got coffeescript's `coffee` working on windows this way. This setup can be automated with a batch file, vb script or installer.

Problem

I have a node app that I wrote, that I run as follows: `node.exe app.js inputArg` Is there some way I can package this into a .exe by itself? So I can just do something like this? `App.exe inputArg` I have some way of faking this by using a batch file, so I can do this: `App.bat inputArg` But this requires that I have all the dependencies and node in that folder, which is not ideal.

Original source

Related problems