Thursday 25 July 2019

Is there any way to have multiple Node.js servers to communicate to one mongoose schema?

Let's say I have three servers (Public server, Admin server and Database server) and I would like to access from the first two one mongoose schema. The main server is the Public one where everything happens, but sometimes, from Admin server I would like to access that schema. I could write the schema on the first two servers, but that would mean bad code. If that is the only solution, I will do it. But, is there any other way of doing this? Could I write something on the database server so that when I connect with mongoose to the MongoDB server to receive the model from there?

Submitted July 25, 2019 at 05:20PM by flaviusbmth

No comments:

Post a Comment