When I started my MEAN path I thought that I will learn all technologies related. With Mongo-Explorer-API project I used 3 out of 4 technologies:

MongoDB (M)

Express.JS (E)

and Node.JS (N)

I was planning to continue with Angular 2 in the client project which supposed to connect the API. After some consideration I came to conclusion that I want to make a detour and instead of building a Web client project in Angular 2 (A) I will work on mobile client first using React Native (N).

So I am taking a detour with MERN. I am so excited!


Found out that examples in MongoDB use co generator to make it easier to write and read async functions:

Something very complicated (because of multiple callbacks) like:
var db = new Database('test', new Server(connectionString.server, connectionString.port));, db) {
if (err)
var adminDb = db.admin();
adminDb.listDatabases(function(err, dbs) {
if (err)
cb(null, dbFound);

becomes very simple when using co:

return co(function*() {
let db = yield MongoClient.connect(url, {ssl:connectionString.ssl});
let dbs = yield db.command({listDatabases:1});