application times out when connecting to MongoLab from Heroku

前端 未结 1 631
暖寄归人
暖寄归人 2021-01-15 20:33

I am hosting a node.js application on Heroku and trying to connect to MongoLab using the node module node-mongodb-native to connect. My application works fine when run from

相关标签:
1条回答
  • 2021-01-15 21:26

    In case anyone else has this issue:

    It is now possible to choose what version of node you would like to run on Heroku. So by adding the following code to my package.json I was able to connect to MongoLab no problem:

    "engines": {
      "node": "0.6.12"
    , "npm": "1.1.4"
    }
    

    Thanks.

    0 讨论(0)
提交回复
热议问题