Приложение Sails не может подключиться к localhost mongo db - PullRequest
1 голос
/ 06 марта 2019

Моему приложению паруса не удается подключиться к локально запущенному экземпляру mongo db local.js, как показано ниже

module.exports.connections = {

  sailsMongoDBServer: {
        adapter: 'sails-mongo',
        host: '127.0.0.1',
        port: 27017,
        database: 'dp-manager-db'
      }
}

Ошибка:

2019-03-06T12:32:01.081Z - error:
{ message:
   'The hook `orm` is taking too long to load.\nMake sure it is triggering its `initialize()` callback, or else set `sails.config.orm._hookTimeout to a higher value (currently 20000)',
  stack:
   'Error: The hook `orm` is taking too long to load.\nMake sure it is triggering its `initialize()` callback, or else set `sails.config.orm._hookTimeout to a higher value (currently 20000)\n    at Timeout.tooLong [as _onTimeout] (E:\\workspace_DpForm\\Eclipse\\dpm-app\\node_modules\\sails\\lib\\app\\private\\loadHooks.js:85:21)\n    at ontimeout (timers.js:436:11)\n    at tryOnTimeout (timers.js:300:5)\n    at listOnTimeout (timers.js:263:5)\n    at Timer.processTimers (timers.js:223:10)',
  code: 'E_HOOK_TIMEOUT' }
2019-03-06T12:32:03.521Z - error: A hook (`orm`) failed to load!
E:\workspace_DpForm\Eclipse\dpm-app\node_modules\mongodb\lib\mongo_client.js:224
          throw err
...