Error: hook ('orm') did not load when lifting sails application using mongo DB

I get this error: hook ('orm') failed to load when trying to raise the sails application using mongoDB. This connections.js file:

module.exports.connections = { mongodb: { adapter : 'sails-mongo', host : 'localhost', port : 27017, database : 'mydb1' } }; 

And this is my models.js file:

 module.exports.models = { connection: 'mongodb' }; 

And this is my local.js file:

 module.exports = { connections: { mongodb: { host : 'localhost', port : 27017, database : 'mydb1' } } } 

Sails v 0.10.1

Any idea why this might happen?

thanks

+6
source share
2 answers

All you have to do is run your mongodb.

Go to: path_to_your_mongodb_installation_folder \ MongoDB \ bin \ mongod.exe Example: C: \ Program Files \ MongoDB 2.6 Standard \ bin

Let us know if this helps!

+8
source

Add

 models: { connect: 'your_mongod_db_adapter_name' } 

in env / development and env / production fixed the problem for me

0
source

Source: https://habr.com/ru/post/973924/


All Articles