I recive a "Express.js returns error in a POST request" when I try to send data in a POST resquest. How I can fix it?

My app.js code:

```
var express = require('express');
var bodyParser = require('body-parser')
var app = express();
var form = require('./routes/form')(app);

app.set('views', __dirname + '/views');
app.set('view engine', 'ejs');
app.use(express.static(__dirname + '/public'));
app.use(bodyParser.urlencoded({ extended: false }));
app.use(bodyParser.json());

app.listen(7777, function(){
  console.log("Running...")
});

```

My form.js code:

```
module.exports = function(app){

  app.get('/form', function(req, res){
    res.render('form');
  });

  app.post('/send', function(req, res){
    console.log(req.body.name);
  });

};

```

My form.ejs code:

```
<form action="/send" method="post">
  <input type="text" name="name" value="">
  <input type="submit" value="Submit">
</form>

```

Console error:

```
TypeError: Cannot read property 'name' of undefined
    at /home/victor/cam/CAMTalk/routes/form.js:9:25
    at Layer.handle [as handle_request] (/home/victor/cam/CAMTalk/node_modules/express/lib/router/layer.js:95:5)
    at next (/home/victor/cam/CAMTalk/node_modules/express/lib/router/route.js:131:13)
    at Route.dispatch (/home/victor/cam/CAMTalk/node_modules/express/lib/router/route.js:112:3)
    at Layer.handle [as handle_request] (/home/victor/cam/CAMTalk/node_modules/express/lib/router/layer.js:95:5)
    at /home/victor/cam/CAMTalk/node_modules/express/lib/router/index.js:277:22
    at Function.process_params (/home/victor/cam/CAMTalk/node_modules/express/lib/router/index.js:330:12)
    at next (/home/victor/cam/CAMTalk/node_modules/express/lib/router/index.js:271:10)
    at expressInit (/home/victor/cam/CAMTalk/node_modules/express/lib/middleware/init.js:33:5)
    at Layer.handle [as handle_request] (/home/victor/cam/CAMTalk/node_modules/express/lib/router/layer.js:95:5)

```

Thanks for the attention!