Simplified serving static files.

This commit is contained in:
Your Name 2014-06-06 20:06:50 +02:00
parent 2a0b2add0d
commit 46717e14ae

View file

@ -13,18 +13,6 @@ angular.module('ffffng').factory('app', function (fs) {
app.use(compress());
app.use('/', express.static(clientDir + '/'));
app.get('/', function (req, res, next) {
fs.readFile(clientDir + '/index.html', 'utf8', function (err, body) {
if (err) {
return next(err);
}
res.writeHead(200, {'Content-Type': 'text/html'});
res.end(body);
return next();
});
});
return app;
});