I have added app.use(bodyParser.urlencoded({extended:true});
but then too it shows this message it is not an error but.Why is this so? screenshot is provided at the end of the code.
Code:
var express = require('express');
var app = express();
var mongoose = require('mongoose');
var bodyParser = require('body-parser');
var morgan = require('morgan');
var cors = require('cors');
var router = require('./routes');
mongoose.set('debug', true);
mongoose.connect('mongodb://localhost/contactlist');
app.use(bodyParser.urlencoded({extented:true}));
app.use(bodyParser.json());
app.use(morgan('dev'));
app.use(cors());
router(app);
app.listen(8081);
console.log('Listening to app on 8081 server');
via Aditya Jain
No comments:
Post a Comment