Skip to content
This repository has been archived by the owner on Jan 22, 2020. It is now read-only.

Commit

Permalink
Merge pull request #85 from reggi/patch-2
Browse files Browse the repository at this point in the history
use path.join
  • Loading branch information
samsel committed Sep 7, 2015
2 parents cd46181 + de4b137 commit cfc776c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/complex/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -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, {
Expand Down

0 comments on commit cfc776c

Please sign in to comment.