Skip to main content

Multi-Server

MoopsyJS is designed out of the box to handle multiple servers effortlessly. Want to see how easy it is?

import MoopsyRedis from '@moopsyjs/redis';

const server = new MoopsyServer({}, { handleAuthLogin });

void MoopsyRedis.connectServer(server, { url: process.env.REDIS_URL });

That's it. All you need is to get an off the shelf Redis DB server, connect each of your server nodes, and you're done!

info

Multi-Server really doesn't factor in for basic client calls server request flows. It really matters when you're doing pub/sub, and documentation for that is still to-do

info

In a coming update, a .publishToNetwork() method will be added to Moopsy Server for simple data-sharing across servers

info

In a coming update, a coordinated tasks feature (ensure a given task in only run on one server) will be implemented