From 238aebb6abe3f46f5c8789598e90c32f4afa26c5 Mon Sep 17 00:00:00 2001 From: Geoffrey Frogeye Date: Fri, 3 Apr 2015 15:10:43 +0200 Subject: [PATCH] Supprimé le déprécié res.sendfile --- app/routes.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/routes.js b/app/routes.js index 2ce8478..29eecc6 100644 --- a/app/routes.js +++ b/app/routes.js @@ -1,3 +1,4 @@ +var path = require('path'); var api = require('./routes/api'); module.exports = function (app) { @@ -5,7 +6,7 @@ module.exports = function (app) { app.use('/api/', api); app.get('*', function (req, res) { - res.sendfile('./public/views/index.html'); + res.sendFile('public/views/index.html', { root: path.normalize(__dirname + '/..') }); }); }; -- libgit2 0.21.2