[nodejs] performance issue with express-validator
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); -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. To post to this group, send email to nodejs@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/4e2c28db-9d32-42a1-8628-d876c5a77387%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[nodejs] How to pass value from one screen to another in Nodejs project?
AlsoI created a simple test.js file inside NodeJS project, not sure where to start I would also like to create app as per attached, with form validation and dropdown from JSON file , once submitted, creates a new MongodB data row Also how to run test.js just by itself. Is there a REPL ? -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. To post to this group, send email to nodejs@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/ede1a361-d3b0-4e85-a2c5-b876a15d2151%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[nodejs] Javascript and DataTables
Following instructions how to use dataTables http://www.datatables.net/examples/ajax/custom_data_flat.html Following this example but where should I place my source data objects_root_array.txt in project directory? [ { "name": "Tiger Nixon", "position": "System Architect", "salary": "$320,800", "start_date": "2011/04/25", "office": "Edinburgh", "extn": "5421" }, { "name": "Garrett Winters", "position": "Accountant", "salary": "$170,750", "start_date": "2011/07/25", "office": "Tokyo", "extn": "8422" },... ] I am using Flask, and I have placed in 1. same location as my loadjson.js 2. top of project root directory data/objects_root_array.txt loadjson.js $(document).ready(function() { $('#example').dataTable( { "ajax": { "url": "data/objects_root_array.txt", "dataSrc": "" }, "columns": [ { "data": "name" }, { "data": "position" }, { "data": "office" }, { "data": "extn" }, { "data": "start_date" }, { "data": "salary" } ] } ); } ); But it is always file cannot be found with a 404 status? -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. To post to this group, send email to nodejs@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/0448c9d6-d585-4bfc-a7db-822c731b82e1%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.