1 post in this collection

Introducing mongo-uri-builder, a Node.js module to easily create mongodb connection strings using objects

A couple of days ago I had the need to store the MongoDB connection string for a Node.js application I am currently building. Of course it was not a big deal and at first I stored it in a file. Anyway at some point I realised that I would needed to override parts of this string to change some settings in production (e.g. adding replicas and authentication settings). For this sake it would have been nice to have a way to store this configuration as a “well organised” object and then override just the…