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

adds express-validator for easy form validation #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions appy.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ var dirname = require('path').dirname;
var lessMiddleware = require('less-middleware');
var passwordHash = require('password-hash');
var clone = require('clone');
var expressValidator = require('express-validator');

var options;
var db;
Expand Down Expand Up @@ -420,6 +421,7 @@ function appBootstrap(callback) {
}

app.use(express.bodyParser());
app.use(expressValidator(options.expressValidator));
app.use(express.cookieParser());

// Express sessions let us remember the mood the user wanted while they are off logging in on twitter.com
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"mongodb": "~1.3.19",
"async": "~0.2.9",
"connect-mongo": "~0.3.3",
"clone": "~0.1.11"
"clone": "~0.1.11",
"express-validator": "~1.0.1"
},
"devDependencies": {},
"optionalDependencies": {},
Expand Down