performance issue with express-validator

56 views
Skip to first unread message

Sebastian M Cheung

unread,
Aug 9, 2015, 3:38:15 PM8/9/15
to nodejs
After adding express-validator, the app slows down dramatically: why is that?

// mongoose config
require('./database');

var express = require('express');
var path = require('path');
var favicon = require('serve-favicon');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
//var expressValidator = require('express-validator');

var routes = require('./routes/index');
var users = require('./routes/users');
var form = require('./routes/form');

var app = express();

// view engine setup
app.set('views', path.join(__dirname, 'views'));
app.set('view engine', 'jade');

// uncomment after placing your favicon in /public
//app.use(favicon(__dirname + '/public/favicon.ico'));
app.use(logger('dev'));
app.use(bodyParser.json());
//app.use(expressValidator);

Matt

unread,
Aug 12, 2015, 9:21:09 PM8/12/15
to nod...@googlegroups.com

On Sun, Aug 9, 2015 at 2:27 PM, Sebastian M Cheung <minsc...@googlemail.com> wrote:
After adding express-validator, the app slows down dramatically: why is that?

One would assume, because node-validator is slow. I'm not sure what other answer you could expect...

What level of slow down are you experiencing?
Reply all
Reply to author
Forward
0 new messages