Download Advanced BAT to EXE converter
(http://www.battoexeconverter.com/)

Download Node.exe from Joyent
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.

As for our BAT command, all we need is:

BAT Command

CD %MYFILES%/
node test.js

%MYFILES% is the variable given to the location of embedded files (more on that in a sec)

Your Advanced BAT to EXE converter window should look like the image on the left.

Don’t worry about bundling the files together just yet, we’ll do 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);
}

Save that .js file locally.

Now, from the File menu, select Build Exe (CTRL+ B)

Enter a filename for the final exe file.

EXE Options

Next, the EXE options pane will be displayed.

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.

I’m currently working on a project involving a node.js app, using RailwayJS, deploying to Heroku.

After doing my

git push Heroku

Everything seemed ok, however, the app was not running.

I ran Heroku logs and was shown:

app[web.1]: listening on port 32168 within production environment
app[web.1]:
app[web.1]: events.js:48
app[web.1]: throw arguments[1]; // Unhandled ‘error’ event
app[web.1]: ^
app[web.1]: Error: ENOENT, open ‘/app/log/production.log’
heroku[web.1]: Process exited with status 1
heroku[web.1]: State changed from starting to crashed

This didn’t tell me much, apart from

ENOENT, open ‘/app/log/production.log’

This means that the file specified can’t be found- or opened in our case.

To resolve this, after suggestion from RailwayJS’ extremely helpful creator, Anatoliy Chakkaev, I simply disabled quiet logging, by changing my environment config to:

app.disable(‘quiet’);