Simplified serving static files.
This commit is contained in:
parent
2a0b2add0d
commit
46717e14ae
|
@ -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;
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue