I've written a few tests for my meteor app. As they have setup and teardown methods that remove all documents or populate with new ones, I'd like to run them on a database dedicated to testing.
I notice the db is stored in .meteor/local/db . Ideally I'd like to have db_test and db_dev accessed form different ports.
Is this possible?
You'll have to run two mongod
processes e.g.
# Dev
mongod --port 27017 --dbpath .meteor/local/db_dev
# Testing
mongod --port 28017 --dbpath .meteor/local/db_test
MONGO_URL="mongodb://127.0.0.1:27017/appname_dev" meteor run --port 3000
MONGO_URL="mongodb://127.0.0.1:28017/appname_test" meteor run --port 4000
That will use separate databases.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With