@ -1,7 +1,16 @@
|
||||
const httpServer = require("http").createServer();
|
||||
const express = require("express");
|
||||
const app = express();
|
||||
const httpServer = require("http").createServer(app);
|
||||
const path = require('path');
|
||||
|
||||
const io = require("socket.io")(httpServer, {cors: {origin: "*", connectionStateRecovery: {
|
||||
maxDisconnectionDuration: 60000}}});
|
||||
|
||||
|
||||
app.use(express.static(path.join(__dirname, './dist')));
|
||||
|
||||
app.get('*', (req, res) => res.sendFile(path.join(__dirname, './dist', 'index.html')));
|
||||
|
||||
const rooms = {};
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user