Select an object between two instances of node

I was wondering if it is possible to split an object between two node instances?

In the first case, I node app1.jscreate the following object:

const bot = new irc.Client(config.server, config.botName, { channels: config.channels });

Is it possible to share this object botwith another instance of node ( node app2.js) and what would I need to use to share?

+4
source share
1 answer

as already mentioned, you can go with http requests since you need another option, you can also go with reddis ( https://redis.io/ ) in dataBase.or memory with mongoDB if you want more persistence.

0
source

Source: https://habr.com/ru/post/1691676/


All Articles