Navigation Menu

Skip to content

Commit

Permalink
Migrate code for express 4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Apr 21, 2014
1 parent 4d21b36 commit 0a50cc7
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions lib/ui/dashboard.js
Expand Up @@ -9,19 +9,19 @@ exports.register = function(application, params) {
prefix = prefix.replace(/\/$/, '');

var topDirectory = path.join(__dirname, '..', '..', '..');
application.configure(function(){
application.set('views', path.join(topDirectory, 'views'));
application.set('view engine', 'jade');
application.use(prefix, express.favicon());
application.use(prefix, express.bodyParser());
application.use(prefix, express.methodOverride());
application.use(prefix, less(path.join(topDirectory, 'public')));
application.use(prefix, express.static(path.join(topDirectory, 'public')));
});

application.configure('development', function() {
application.set('views', path.join(topDirectory, 'views'));
application.set('view engine', 'jade');
application.use(prefix, express.favicon());
application.use(prefix, express.bodyParser());
application.use(prefix, express.methodOverride());
application.use(prefix, less(path.join(topDirectory, 'public')));
application.use(prefix, express.static(path.join(topDirectory, 'public')));

var env = process.env.NODE_ENV || 'development';
if (env == 'development') {
application.use(prefix, express.errorHandler());
});
}

application.get(prefix + '/dashboard', function(request, response) {
response.render('index', { title: '', prefix: prefix });
Expand Down

0 comments on commit 0a50cc7

Please sign in to comment.