kerberos84
kerberos84

Reputation: 300

How can i change the database of my meteor app

I have my meteor app using the database named 'meteor'. (mongo db)

Now i decided to crate a new database named 'myNewDB' and new collections named.

Somehow i can not connect to this new database with my meteor app.

How can i configure my app to connect to new database instead of old one?

Upvotes: 0

Views: 473

Answers (2)

Hanh D.TRAN
Hanh D.TRAN

Reputation: 46

You can set up new database connection with MONGO_URL in environtment var

Upvotes: 0

Francesco Pezzella
Francesco Pezzella

Reputation: 1795

You can start your meteor application providing a MONGO_URL environment variable where you can set a specific mongodb connection string:

MONGO_URL=mongodb://user:password@localhost:27017/yourDbName meteor

Meteor environment variables are listed here

Upvotes: 1

Related Questions