Permalink
Browse files

[fix] Make public root relative to server

  • Loading branch information...
1 parent e889010 commit d825b9d4ba662d7d3b51256b38ff8878f20f3e42 @mmalecki mmalecki committed Jun 22, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 server/server.js
View
@@ -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);

0 comments on commit d825b9d

Please sign in to comment.