What is the best option to use two clients with one database?


#1

I am creating a new app, and I want to create two different clients for it, one will be a mobile app, and the other one will be a web administrator to manage the content of the app, for this I have found that the best option is to create two separate Meteor apps, but I have a question about what is the best way to ‘use’ the same database on both ‘clients’.

From searching I have found two methods I liked, one is using Meteor’s DDP, and the other is setting the mongo database of one of the clients to the other using export MONGO_URL= so I wanted to know which one would be the best and why considering that both apps need to be able to log-in/register users, and manage almost the same data on the database.

Thanks in advance. :wink:


#2

Yes. If you just only need to use the DB, just share the DB with both apps.

If you need to share functionalities between apps, do with DDP as Microservices style.