From de4b137d05d27f7120eb7aa0e1ccf9d828675b1f Mon Sep 17 00:00:00 2001 From: Thomas Reggi Date: Mon, 7 Sep 2015 17:02:54 -0400 Subject: [PATCH] use path.join --- examples/complex/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/complex/index.js b/examples/complex/index.js index e609182..c7f8e51 100644 --- a/examples/complex/index.js +++ b/examples/complex/index.js @@ -26,15 +26,15 @@ var app = express(); // create the view engine with `react-engine` var engine = renderer.server.create({ - routes: require(path.join(__dirname + '/public/routes.jsx')), - routesFilePath: path.join(__dirname + '/public/routes.jsx') + routes: require(path.join(__dirname, '/public/routes.jsx')), + routesFilePath: path.join(__dirname, '/public/routes.jsx') }); // set the engine app.engine('.jsx', engine); // set the view directory -app.set('views', __dirname + '/public/views'); +app.set('views', path.join(__dirname, '/public/views')); // set jsx as the view engine app.set('view engine', 'jsx'); @@ -43,7 +43,7 @@ app.set('view engine', 'jsx'); app.set('view', renderer.expressView); //expose public folder as static assets -app.use(express.static(__dirname + '/public')); +app.use(express.static(path.join(__dirname, '/public'))); app.get('/', function(req, res) { res.render(req.url, {