In the last video we learnt how to talk to a MongoDB database using the mongo_dart package.
In this video we will learn how to write a RESTful api to talk to our MongoDB database with inbuilt Dart classes and the mongo_dart package. MongoDB is a well-known NoSQL database that stores its items as JSON documents (BSON to be exact).
At the end of this video, you will be comfortable writing a RESTful api to interface with a MongoDB database.
Further reading
- Dart and MongoDB Tutorial #1: Using the mongo_dart package
- AngularDart Tutorial #5: Firebase Integration
- 10 Interesting Dart and CSS libraries for May 2019
Sharing is caring 
If you enjoyed reading this post, please share this through the various social buttons hovering on the left/top side of the screen . Also, check out and subscribe to my YouTube channel (hit the bell icon too) for videos on Dart.
Subscribe to the newsletter for my free 35-page Get started with Dart eBook and to be notified when new content is released.
Like, share and follow me for more content on Dart.
Hey Jermaine,
It is a way to receive from server a find() command as Json string? Because what I receive is a Json like but without the quotation marks. Thanks
I found the answer: response=await coll.find().toList();
var jsonResponse=jsonEncode(rasponse);
Glad you found a working solution Sorin. Make sure to set the `Content-Type` of your response headers to `application/json`.
Hi Jermaine,
I need to make a request from a dart file to a dart server with a mongodb query, and the server to reply accordingly. Could you help me?
that query will be inserted in coll.find()