Added login and sessiontoken

This commit is contained in:
2025-10-02 22:27:07 +02:00
parent 2bae9db84f
commit e4c038c940
9 changed files with 69 additions and 5 deletions

View File

@@ -3,9 +3,10 @@ dotenv.config();
import express from "express";
import expressWs from "express-ws";
import morgan from "morgan";
import { initWebsocket } from "./websocket.js";
import { initAuth } from "./auth.js";
import { close as closeDbConnection, initDbConnection, db } from "./db.js";
import cookieParser from "cookie-parser";
import { initWebsocket } from "./src/websocket.js";
import { initAuth } from "./src/auth.js";
import { close as closeDbConnection, initDbConnection, db } from "./src/db.js";
const app = express();
const appWs = expressWs(app);
const port = 12345;
@@ -18,6 +19,7 @@ process.on('exit', function() {
app.use(morgan(process.env.production ? 'common' : 'dev'));
app.use(express.json());
app.use(cookieParser());
await initDbConnection();