Commit 238aebb6abe3f46f5c8789598e90c32f4afa26c5

Authored by Geoffrey PREUD'HOMME
1 parent 25f72955

Supprimé le déprécié res.sendfile

Showing 1 changed file with 2 additions and 1 deletions   Show diff stats
  1 +var path = require('path');
1 var api = require('./routes/api'); 2 var api = require('./routes/api');
2 3
3 module.exports = function (app) { 4 module.exports = function (app) {
@@ -5,7 +6,7 @@ module.exports = function (app) { @@ -5,7 +6,7 @@ module.exports = function (app) {
5 app.use('/api/', api); 6 app.use('/api/', api);
6 7
7 app.get('*', function (req, res) { 8 app.get('*', function (req, res) {
8 - res.sendfile('./public/views/index.html'); 9 + res.sendFile('public/views/index.html', { root: path.normalize(__dirname + '/..') });
9 }); 10 });
10 11
11 }; 12 };