Added login and sessiontoken
This commit is contained in:
8
index.js
8
index.js
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user