Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #1 from mmalecki/relative-static

[fix] Make public root relative to server
  • Loading branch information...
commit 9a267ad4d2f2cc335a7cca31bdaa851ea633e052 2 parents ff047c7 + d825b9d
Paolo Fragomeni authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  server/server.js
View
3  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(8000);
- var file = new static.Server('./public/');
+ var file = new static.Server(path.join(__dirname, '..', 'public'));
function handler(req, res) {
file.serve(req, res);
Please sign in to comment.
Something went wrong with that request. Please try again.