Skip to content

Commit 0a5a8a2

Browse files
author
Ken Howard
committed
Fix path issue.
1 parent 243ce38 commit 0a5a8a2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/routes/router.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ var routes = function () {
3838
}
3939

4040
//Load the JavaScript file ("controller") and pass the router to it
41-
require('../' + fullName)(router);
41+
require(fullName)(router);
4242
//Associate the route with the router
4343
app.use(baseRoute, router);
4444
}

src/server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ process.on('uncaughtException', function(err) {
3737
//*********************************************************
3838
// Convention based route loading (saves a lot of code)
3939
//*********************************************************
40-
routes.load(app, './controllers');
40+
routes.load(app, __dirname + '/controllers');
4141

4242
app.listen(port, function (err) {
4343
console.log('[%s] Listening on http://localhost:%d', app.settings.env, port);

0 commit comments

Comments
 (0)