Can I host node.js and Django in one server?

Problem

I only have one VPS hosting and using nginx for Django web application. Now, I prepare to start new app with Node.js and can I host on current Server ? I think, Node.js is running the own http server and it can conflict with nginx server.

Problem courtesy of: saturngod

Solution

You can host multiple http servers on single VPS. Conflict will happen only if both, nginx and node.js, are bound to the same port. For example if your nginx web server is listening on port 80, then your node.js http server should listen on other than 80, lets say port 8080. You can also set up reverse proxy (in case you need to abstract your internal network and serve clients on the same port) where you will accept incoming connections on port 80 and nginx will forward communication specific for node.js to port 8080.

Solution courtesy of: yojimbo87

View additional discussion.