Meteor Up deployment, can't use meteor mongo --url

前端 未结 7 1300
-上瘾入骨i
-上瘾入骨i 2020-12-09 06:21

I\'ve recently deployed my Meteor app to a Digital Ocean droplet running Ubuntu 14.04 x32. I used Meteor Up with this mup.json file:



        
7条回答
  •  臣服心动
    2020-12-09 06:52

    It took me a while to figure this out. It is not possible to access the mongodb server from outside your hosting server. Therefore, you have to ssh into your server first and work from there. To connect to your db with pymongo, use the following:

    client = MongoClient('mongodb://localhost/APPNAME')
    posts = client.APPNAME.posts
    

    APPNAME should be specified in your mup.json file and replace posts with whatever collection you must update.

提交回复
热议问题