Skip to content

Instantly share code, notes, and snippets.

View Gabri's full-sized avatar
💭
Stay human

Gabri Gabri

💭
Stay human
View GitHub Profile
@dstevensio
dstevensio / gist:3555326
Created August 31, 2012 16:20
Hosting node.js web apps on Webfaction - path inconsequential
Suppose you set up a custom app (listening on port) with Webfaction and you are assigned port 34544.
Now, let's say your node app is deployed by pushing to github on your local machine and pulling it down to your webfaction server.
The actual location within the directory Webfaction's control panel set up for you is irrelevant, so when you clone your Git repo, it creates a subfolder within the created directory - so your node app isn't at the root. But it'll still work as long as you get the correct port:
example node app:
var http = require('http');
http.createServer(function (req, res) {