olzgeorgia.blogg.se

Failed to start mongodb server on port 3002
Failed to start mongodb server on port 3002




failed to start mongodb server on port 3002

In terms of installation, both are independent: when you install Mongoose, you don't automatically install MongoDB (and vice versa). MongoDB itself, which is the database(-server) that will store the documents you create with Mongoose.Mongoose, which offers object modeling for MongoDB.I've tried starting the mongoose connection manually with mongod but I get the error: ERROR: dbpath (/data/db) does not exist.Ĭreate this directory or give existing directory in -dbpath. The database has not been created but the instructor mentioned it should be automatically created if it doesn't already exist. It is definitely the mongoose connection that is causing the error as it goes away when I remove the connection line. I've installed all the neccessary npm packages etc. This is quite frustrating because I am following a Pluralsight course very closely. (/Users/admin/Documents/NodeAndExpress/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/server.js:549:74) However I keep getting the error: Gulp is running my app on PORT: 8000Įrror: failed to connect to Īt null. My gulpfile is: var gulp = require('gulp'), Module.exports= mongoose.model('Book', bookModel) Var Book = require('./models/bookModel') Ĭonsole.log('Gulp is running my app on PORT: ' + port) īookmodel.js file: var mongoose = require('mongoose'),

failed to start mongodb server on port 3002

Var db = nnect('mongodb://localhost/bookAPI') I have the following code: var express = require('express'),






Failed to start mongodb server on port 3002