title: Node.js Express.js bodyParser POST limit
body: <p>I'm trying to set the <code>limit</code> option for <code>bodyParser.urlencodedParser</code> as my POST data is bigger than the default value.  My code currently looks like the following but whatever i try i always receive the following error:</p>
  
  <p>Error: request entity too large</p>
  
  <pre><code>var express = require('express');
  var router = express.Router();
  var jsonfile = require('jsonfile');
  var bodyParser = require('body-parser');
  
  var urlencodedParser = bodyParser.urlencoded({limit: '5mb'});
  
  router.post('/data', urlencodedParser ,function(req, res) {
  
  
      if(typeof req.body.data === 'undefined')
      {
         console.log('Missing data');
         res.status(500).send({ error: 'Missing Data Parameters' });
         return;
      }
  
      // Static return value
      var output = [ 
          {"f" : "1"},
          {"f" : "2"},
          {"f" : "3"}
      ];
  
      res.send(output);
  }
  </code></pre>
  
  <p>Any help greatly appreciated.</p>