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
Original file line number Original file line Diff line number Diff line change
@@ -1,12 +1,13 @@


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


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


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


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

0 comments on commit d825b9d

Please sign in to comment.