On Meteor 1.5, I need to run (2) copies of the same codebase (same directory to start), on (2) different ports, that talk to (1) database, at the same time on my local box.
I tried to test this:
If I just run
npm run admin in the
/meteors/test-app directory it starts up fine with data in the database and the proper structure.
"admin": "meteor --port 3000 --settings .config/development/settings.json", "client": "meteor --port 3002 --settings .config/development/settings.json",
If I type in
meteor mongo in the
/meteors/test-app directory (the now running app) I get the following:
MongoDB shell version: 3.2.12 connecting to: 127.0.0.1:3001/meteor
I stop the app and now If I try to specifiy that same localhost and port with a MONGO_URL I get an error when trying to run:
"admin": "MONGO_URL=mongodb://localhost:3001/meteor meteor --port 3000 --settings .config/development/settings.json",
MongoError: failed to connect to server [localhost:3001] on first connect
This is my first problem, and without getting past it, I don’t see how I can run with (1) meteor application directory on (2) different ports yet still point to (1) database.
Here’s the SO question on this: https://stackoverflow.com/questions/44953196/running-multiple-meteor-apps-at-the-same-time-locally
The original question on Github: https://github.com/meteor/meteor/issues/6532#issuecomment-313290558