separate out publisher

This commit is contained in:
Nour Alharithi
2023-10-27 09:45:43 -07:00
parent e047def3a6
commit 63d85ddc67
6 changed files with 135 additions and 32 deletions

View File

@@ -14,8 +14,11 @@ app.set('trust proxy', 1);
const server = http.createServer(app);
const io = new Server(server);
const REDIS_HOST = process.env.REDIS_HOST || 'localhost';
const REDIS_PORT = process.env.REDIS_PORT || '6379';
async function main() {
const redisClient = new RedisClient('localhost', '6379');
const redisClient = new RedisClient(REDIS_HOST, REDIS_PORT);
await redisClient.connect();
io.on('connection', (socket) => {