npm workspaces, NodeNext for server

This commit is contained in:
Nathaniel Tampus
2023-02-05 13:49:40 +08:00
parent dc233b2c84
commit bd39cf8c46
49 changed files with 129 additions and 1605 deletions

View File

@@ -1,15 +1,15 @@
import "dotenv/config";
import cors from "cors";
const corsConfig = { origin: "https://ches.su", credentials: true };
import express, { Request, Response, NextFunction } from "express";
import type { Request, Response, NextFunction } from "express";
import express from "express";
import { createServer } from "http";
import session from "./middleware/session";
import session from "./middleware/session.js";
import { Server } from "socket.io";
import { init as initSocket } from "./socket";
import { db } from "./db";
import { init as initSocket } from "./socket/index.js";
import { db } from "./db/index.js";
import routes from "./routes/index.js";
import routes from "./routes";
const corsConfig = { origin: "https://ches.su", credentials: true };
const app = express();
const server = createServer(app);