Configuring MongoDB cluster for Flutter


MongoDB is NoSQL database just like Firebase, Raven ect. It will store data as Json structure / Map with key value pair. NoSQL offer great flexibility coupled with speed.

Flutter app with an cloud database will be awesome . The simplest way to try with cloud database is Mongo or Firebase , both have free tier plans. Visit MongoDB  and create  a cluster (start with 512 MB free tier) and also Database and collection.

So How do we make MongoDB ready for flutter ?. We can use any package from pub.dev ( mogno_dart is recommended)  which is a driver to access ( just like database driver for SQL on .Net or any other language) Mongodb cluster  database and collections for performing CURD operations.

Before that we have to configure Network Access on Mongo cluster. Mongo cluster can be enabled for particular IP address or you can enable anywhere access mode by entering  0.0.0.0/0  in Network Access of mongo cluster. Other wise your Flutter connection never  succeed.

Then you can grab the connection string using the Wizard and goon with mongo_dart.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.