0

I am following this guide:

https://learn.microsoft.com/en-us/azure/app-service-web/app-service-web-nodejs-sails-cli-nodejs

In section "Connect to a database in Azure" step 10, I am getting the error:

Error: The hook 'orm' is taking too long to load. Make sure it is triggering its 'initialize()' callback, or else set 'sails.config.orm._hookTimeout to a higher value (currently 20000)

I get this error when I "sails lift"

I tried editing the loadhook.js folder to increase the timeout. No luck.

All the other steps went smoothly. The mongo db is running on azure. I added the

models: { connection: 'docDbMongo', migrate: 'alter' },

to both development.js and production.js but in production.js i have migrate 'safe' just like in the guide.

What do I do now?

Thanks,

Logan_B
  • 527
  • 1
  • 7
  • 22

1 Answers1

0

I found that property port is missing within object docDbMongo in step 7 called "Open config/local.js and add the following connections object". I thought that raised your issue.

connections: {
    docDbMongo: {
        user: "<database user>",
        password: "<database password>",
        host: "<database hostname>",
        port: "10250", // add this line to config/local.js
        database: "<database name>",
        ssl: true
    },
},
Aaron Chen
  • 9,835
  • 1
  • 16
  • 28