MongoEngine / eve-mongoengine

An Eve extension for MongoEngine ODM support
Other
39 stars 28 forks source link

Connection to replica sets #19

Open kcaylor opened 9 years ago

kcaylor commented 9 years ago

The connection assumes a single host and does not accommodate the possibility of a replica set. The easiest fix would be to allow for the use of a MONGO_URI when setting up the connection, which - if set - would be used to make the connection rather than building the connection using the MONGO_HOST, and MONGO_PORT variables. If MONGO_URI is not set, then the behavior would remain as in the current implementation. Thoughts?

Alain1405 commented 9 years ago

This is a must for deployment on Heroku, as the main mongodb addons only export database credentials in a MONGO_URI format. Isn't eve-mongoengine importing flask-pymongo? It supports MONGO_URI