There are a handful of websites out there that will host your node.js server/app for you. But what if I want to deploy it on my own hardware, making it viewable from example.com? How do I do that? Thanks.
This shouldn’t make a difference, but just in case, this is the software I’m using:
I’m using express.js, node.js, socket.io, and Linux (one of my developers is making an OS specifically for my app, or so he says. We may just use an established distro, but we’re still in the planning process).
There are several ways of hosting node.js projects.
You can hook it up behind nginx or apache, so they would do the static file exchange, but since you want to use websockets, then it shouldnt be good idea.
You can also use just plain node.js and it can be set up in millions of ways based on your needs. Starting with your plain express project just run by node app.js.
But most likely you want to use something like forever http://blog.nodejitsu.com/keep-a-nodejs-server-up-with-forever to keep your node instance alive.
I loved cluster.js set up but its outdated.
Some more links with good info:
There are more info out there, your developers will just have to dig and figure out whats best for your project. Also deployment descriptions for Amazon EC2 is pretty much the same as on any hardware you own.
P.S. Also basic stuff: point out your domain to your server ip, run node with port 80, your good to go.