generated from lucien/api-template
fix: improved websocket usage
This commit is contained in:
parent
fbf7821320
commit
132b1f3c06
7 changed files with 135 additions and 79 deletions
|
@ -14,6 +14,10 @@ app.use(express.json());
|
|||
app.use(cookieParser());
|
||||
app.use(cors());
|
||||
|
||||
const { router, socketsMiddleware } = require("./libs/middlewares");
|
||||
app.use("/api/ws", router);
|
||||
app.use(socketsMiddleware);
|
||||
|
||||
function loadRoutes(folderName) {
|
||||
const routesPath = path.join(__dirname, folderName);
|
||||
const files = fs.readdirSync(routesPath);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue