0

In the Meteor framework, is it possible to create two databases?

I have read the Meteor API document but I only found the collection operation. I also tried to search the google, however, I can't get anything useful.

I am confused how to create a new database and how to use it? Does Meteor support this?

aaronk6
  • 2,701
  • 1
  • 19
  • 28
JinM
  • 61
  • 7
  • 4
    yes you can..please check this [link](http://stackoverflow.com/questions/20535755/using-multiple-mongodb-databases-with-meteor-js) – Aysha Azura Mar 31 '16 at 09:32

1 Answers1

0

When you create a new meteor project (meteor create my-project) a new database is created for that project. Within this database you can create "collections" for you data.

If you want to use a different instance of mongo (the only currently supported database) you have to change the environment variables as explained here, or if you want to use multiple mongo instances for different collections look at this post that was mentioned in the comments on your question. That is a very advanced use case though!

Community
  • 1
  • 1
Tristan
  • 1,004
  • 7
  • 14