feat(migration): settings migration from old app all is now in the new app
This commit is contained in:
13
app/main.ts
13
app/main.ts
@@ -3,16 +3,14 @@ process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
|
||||
import { toNodeHandler } from "better-auth/node";
|
||||
import cors from "cors";
|
||||
import express from "express";
|
||||
import fs from "fs";
|
||||
import { createServer } from "http";
|
||||
import { createProxyMiddleware, fixRequestBody } from "http-proxy-middleware";
|
||||
import { createProxyMiddleware } from "http-proxy-middleware";
|
||||
import morgan from "morgan";
|
||||
import os from "os";
|
||||
import { dirname, join } from "path";
|
||||
import swaggerJsdoc from "swagger-jsdoc";
|
||||
import swaggerUi from "swagger-ui-express";
|
||||
import { fileURLToPath } from "url";
|
||||
import { userMigrate } from "./src/internal/auth/controller/userMigrate.js";
|
||||
import { schedulerManager } from "./src/internal/logistics/controller/schedulerManager.js";
|
||||
import { setupMobileRoutes } from "./src/internal/mobile/route.js";
|
||||
import { printers } from "./src/internal/ocp/printers/printers.js";
|
||||
@@ -22,6 +20,7 @@ import { baseSettings } from "./src/internal/system/controller/settings/baseSett
|
||||
import {
|
||||
addListeners,
|
||||
manualFixes,
|
||||
settingsMigrate,
|
||||
} from "./src/internal/system/utlis/addListeners.js";
|
||||
import { swaggerOptions } from "./src/pkg/apiDocs/swaggerOptions.js";
|
||||
import { auth } from "./src/pkg/auth/auth.js";
|
||||
@@ -77,6 +76,7 @@ const main = async () => {
|
||||
}
|
||||
|
||||
// connect to the prod sql
|
||||
console.log("Connecting to the sql server");
|
||||
await initializeProdPool();
|
||||
|
||||
// express app
|
||||
@@ -218,11 +218,16 @@ const main = async () => {
|
||||
v1Listener();
|
||||
addListeners();
|
||||
//userMigrate();
|
||||
|
||||
// some temp fixes
|
||||
// above 230 remove these
|
||||
manualFixes();
|
||||
settingsMigrate();
|
||||
}, 5 * 1000);
|
||||
|
||||
// setTimeout(() => {
|
||||
// startHonoServer();
|
||||
// }, 8 * 1000);
|
||||
|
||||
// start the server up
|
||||
server.listen(PORT, "0.0.0.0", () =>
|
||||
log.info(
|
||||
|
||||
Reference in New Issue
Block a user