serve static relative to sources

This commit is contained in:
oleg 2015-07-28 23:56:27 +03:00
parent 5d3b97c64b
commit c9e4c017be

2
app.js
View File

@ -18,7 +18,7 @@ var app = new EventEmitter(),
logger = libLogger('app'),
httpApi = require('./httpApi')(app);
var staticServer = new nodeStatic.Server('./static');
var staticServer = new nodeStatic.Server(path.join(__dirname, 'static'));
var server = http.createServer(function(req, res) {
if (req.url.indexOf('/api/') === 0) {
return httpApi(req, res);