Visheshtanwar / CRUD-Angular2-Node

This is simple CRUD application in angular 2 with node and express.
2 stars 1 forks source link

server doesn't work #1

Open Marcopo5 opened 7 years ago

Marcopo5 commented 7 years ago

I'm a beginner in Angular 2. My server doesn't start. When I type the command: nodemon bin/www The result is: $ nodemon bin/www [nodemon] 1.11.0 [nodemon] to restart at any time, enter rs [nodemon] watching: . [nodemon] starting node bin/www

Mongoose default connection disconnected Mongoose default connection error: MongoError: failed to connect to server [loca lhost:27017] on first connect [MongoError: connect ECONNREFUSED 127.0.0.1:27017] (node:8124) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejec tion id: 1): MongoError: failed to connect to server [localhost:27017] on first connect [MongoError: connect ECONNREFUSED 127.0.0.1:27017]

Can you help me please? Thank you very much.

visheshmeanstack commented 7 years ago
  1. sudo rm /var/lib/mongodb/mongod.lock
  2. sudo mongod --repair
  3. sudo start mongodb