blob: e5b35ed2933227087aba89cc4014212ad155ca7a [file] [log] [blame]
'use strict';
var express = require('express');
var pathlib = require('path');
var app = express();
function pathTo(path) {
return pathlib.join(__dirname, path);
}
app.use('/public', express.static(pathTo('public')));
app.use('/third_party', express.static(pathTo('third_party')));
app.get('*', function(req, res) {
res.sendFile(pathTo('public/index.html'));
});
var server = app.listen(process.env.PORT || 4000, function() {
var hostname = require('my-local-ip')();
console.log('Serving http://%s:%d', hostname, server.address().port);
});