formatted file

This commit is contained in:
Karma Riuk
2025-05-07 16:51:25 +02:00
parent cc920ed8f2
commit 3c9ab4c4be
2 changed files with 48 additions and 37 deletions

View File

@ -1,7 +1,8 @@
import express, { json } from 'express';
import cors from 'cors';
import dotenv from 'dotenv';
import routes from './routes/index.js';
import express, { json } from "express";
import cors from "cors";
import dotenv from "dotenv";
import routes from "./routes/index.js";
import createSocketServer from "./socket.js";
dotenv.config();
@ -14,9 +15,11 @@ app.use(json());
// Use routes
app.use(express.static("public"));
app.use('/', routes);
app.use("/", routes);
const server = createSocketServer(app);
// Start server
app.listen(port, () => {
server.listen(port, () => {
console.log(`Server is running on port ${port}`);
});
});