aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/config/express.js
diff options
context:
space:
mode:
authorDennis Eriksen <dennis.se@gmail.com>2013-05-10 10:02:36 +0200
committerDennis Eriksen <dennis.se@gmail.com>2013-05-10 10:02:36 +0200
commit8508bc7850e01fce03bd2347f4938c6e78e64eed (patch)
tree141145810033acfa9bf2afd905b01a93d451e346 /config/express.js
parentadded express-validator as dependency (diff)
downloadDivid-8508bc7850e01fce03bd2347f4938c6e78e64eed.tar.gz
added express-validator middleware
Diffstat (limited to '')
-rw-r--r--config/express.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/config/express.js b/config/express.js
index eb10b20..034eff5 100644
--- a/config/express.js
+++ b/config/express.js
@@ -3,7 +3,8 @@
* Module dependencies
*/
-var express = require('express');
+var express = require('express')
+ , expressValidator = require('express-validator');
/**
@@ -28,6 +29,8 @@ module.exports = function (app, config, passport) {
app.use(express.bodyParser()); //must be above methodOverride
+ app.use(expressValidator); // loads validation
+
app.use(express.methodOverride());
app.use(express.session({ secret: 'lsdrghoi4hgqio42nqf2uqi32f3bilu23fl23b' }));