Saturday 10 June 2017

How to create new db connection for client without restart service

How to create new db connection for client without restart service

Let's say I have app.js service. whenever new client connect to service , we will check if mongodb connection is already establise for new client or not(check db connection corssponding to client id)

if not available then we will fatch server ip,dbname ,collection name from file and connect to db,and reply to user

Here we can add new client add and corrsponding info to Client Info at any time.

Client Info ClientId: ServerIp : Database Name :Collection Name



via Aakash Kag

No comments:

Post a Comment