Skip to content

Commit

Permalink
[fix] Make public root relative to server
Browse files Browse the repository at this point in the history
  • Loading branch information
mmalecki committed Jun 22, 2012
1 parent e889010 commit d825b9d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/server.js
@@ -1,12 +1,13 @@

var fs = require('fs'),
path = require('path'),
sio = require('socket.io'),
static = require('node-static');

var app = require('http').createServer(handler);
app.listen(80);

var file = new static.Server('./public/');
var file = new static.Server(path.join(__dirname, '..', 'public'));

function handler(req, res) {
file.serve(req, res);
Expand Down

0 comments on commit d825b9d

Please sign in to comment.