In Meteor.js, how would I have two development projects use the same Mongo instance?

后端 未结 2 1282
醉梦人生
醉梦人生 2021-01-02 18:44

I would like to have two separate applications use the same Mongo DB instance, and since I am developing them at the same time I would like to be able to share the same deve

2条回答
  •  醉话见心
    2021-01-02 19:23

    Yeah, you can just start meteor with the MONGO_URL parameter like:

    $ MONGO_URL="mongodb://localhost:27017/myapp" meteor
    

    or

    $ MONGO_URL="mongodb://localhost:27017/myapp" meteor --port 4000
    

    This assumes you have mongodb installed on your system. See this question for ways to make this process a little easier by using environment variables or a start script.

提交回复
热议问题