From 5bf0e511cae6c28790416973e1226680c74823eb Mon Sep 17 00:00:00 2001 From: Prashanth Date: Sat, 20 Oct 2012 19:08:10 +0530 Subject: [PATCH] Changing the order of bodyparser. --- app.js | 4 ++-- hello/urls.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app.js b/app.js index 3e6d30d..09a597d 100644 --- a/app.js +++ b/app.js @@ -8,6 +8,8 @@ var app = module.exports = express(); app.configure(function(){ app.set('port', process.env.PORT || 3000); + app.use(express.bodyParser()); + app.use(express.methodOverride()); app.set('view engine', 'jade'); app.set("views", path.join(PROJDIR, "templates")); app.use(express.favicon()); @@ -17,8 +19,6 @@ app.configure(function(){ app.get(/\/js/, express.static(path.join(static,'js'))); app.get(/\/css/, express.static(path.join(static,'css'))); app.get(/\/images/, express.static(path.join(static,'images'))); - app.use(express.bodyParser()); - app.use(express.methodOverride()); }); app.configure('development', function(){ diff --git a/hello/urls.js b/hello/urls.js index 6038120..3ca5a7c 100644 --- a/hello/urls.js +++ b/hello/urls.js @@ -1,4 +1,4 @@ -var views = require('./views.js') +var views = require('./views.js'); module.exports = function(app){ app.get(/\/hello/ , views.hello);