Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I just set up my first node app on Heroku last week. As far as I can tell, doing anything with sockets is not possible, per their doumentation, however, I have been pleased with the service thus far. Here is the article from Heroku as to how to set it all up:

http://devcenter.heroku.com/articles/node-js

You have to use an add-on for Mongo, but it's easy to configure that from the Heroku app dashboard. Overall, I have been pleased thus far. The one gotcha I ran into was that you have to define the port the app will listen on as process.env.PORT as opposed to your own port. Thus, assuming you are using express, the line is:

app.listen(process.env.PORT || YOUR LOCAL DEV PORT);



Don't forget that Heroku's "PORT" is a string while app.listen will expect an int. Easy fix, just parseInt(process.env.PORT).


http://devcenter.heroku.com/articles/node-js

"-----> Compiled slug size is 3.2MB"

It takes 3.2MB to say "Hello World!" on Heroku using Node.js?


a `Hello World` HTTP Server + Express + Connect

that's basically Rails




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: