Я новичок ie на узле.
Я получаю следующую ошибку,
TypeError: req.redirect is not a function
at Post.create (/var/www/html/node_blog/index.js:40:7)
at /var/www/html/node_blog/node_modules/mongoose/lib/utils.js:276:16
at Function.<anonymous> (/var/www/html/node_blog/node_modules/mongoose/lib/model.js:4798:21)(/var/www/html/node_blog/node_modules/mongoose/lib/model.js:486:7)
at /var/www/html/node_blog/node_modules/kareem/index.js:315:21
Emitted 'error' event at:
at /var/www/html/node_blog/node_modules/mongoose/lib/model.js:4781:13
at /var/www/html/node_blog/node_modules/mongoose/lib/utils.js:276:16
[... lines matching original stack trace ...]
at process._tickCallback (internal/process/next_tick.js:61:11)
Ниже приведен мой код
app.post('/post/save', (req, res) => {
Post.create(req.body, (err, post) => {
req.redirect('/');
});
});