This is my db.js:
import mongoose from 'mongoose';
export default () => {
mongoose.Promise = global.Promise;
mongoose.connect('mongodb://localhost/meetupapp');
mongoose.connection
.once('open', () => console.log('Mongodb running'))
.on('error', err => console.error(err));
};
and this is the error message: MongoError: failed to connect to server [localhost:27017] on first connect] name: 'MongoError
I've installed mongodb!
via Denis Doan
No comments:
Post a Comment