Rafael N. answered 03/04/20
Software engineer focused on front-end web technologies.
Hey there!
Great question. You might be thinking to yourself that being able to connect to your database client side would be a good idea, and it's actually possible.
However, because anyone has access to your client side code (via developer tools, page source, etc.), this means that credentials specific to that database (i.e., your connection string) would also be available. This is a gaping security hole and would open up your data to the masses.
Stick to using MongoDB adapters, specific to server side language where communication happens on back, more secure channel (not visible through the Network tab or tools like Fiddler and WireShark).
Please reach out if you have any other questions!