This commit is contained in:
Sergey Yarkov 2026-03-13 00:18:28 +03:00
parent c0e1e2f655
commit c4831cd7bd

View File

@ -5,12 +5,14 @@ import { reportsHandlers } from "#handlers/index.js";
import packageJson from "./package.json" with { type: "json" }; import packageJson from "./package.json" with { type: "json" };
import db from "./db.js"; import db from "./db.js";
/** @import {HttpContext, HttpServerOptions} from "#root/http-server/types/http-server.js" */
const SERVER_PORT = Number.parseInt(`${process.env.PORT || "3000"}`, 10); const SERVER_PORT = Number.parseInt(`${process.env.PORT || "3000"}`, 10);
/** @type {Map<string, import("./http-server/types/http-server.js").HttpContext>} */ /** @type {Map<string, HttpContext>} */
export const clients = new Map(); export const clients = new Map();
/** @type {import("./http-server/http-server.js").HttpServerOptions['cors']} */ /** @type {HttpServerOptions['cors']} */
const cors = { const cors = {
allow: "*", allow: "*",
methods: "GET,POST,DELETE,UPDATE,PUT,PATCH", methods: "GET,POST,DELETE,UPDATE,PUT,PATCH",