feat(migration): settings migration from old app all is now in the new app

This commit is contained in:
2025-11-24 15:22:12 -06:00
parent 90920e8fba
commit 40bc19aa6f
6 changed files with 248 additions and 110 deletions

View File

@@ -253,12 +253,60 @@ process.on("beforeExit", async () => {
process.exit(0);
});
// const port =
// process.env.NODE_ENV === "development"
// ? process.env.VITE_SERVER_PORT
// : process.env.PROD_PORT;
// const ocmeport = process.env.OCME_PORT;
// serve(
// {
// fetch: app.fetch,
// port: Number(port),
// hostname: "0.0.0.0",
// },
// (info) => {
// createLog(
// "info",
// "LST",
// "server",
// `Server is running on http://${info.address}:${info.port}`,
// );
// },
// );
// /**
// * Only for ocme until we get them switched over to the single port setup.
// */
// // const setting = await db.select().from(settings);
// const setting = serverSettings;
// const isActive = setting.filter((n) => n.name === "ocmeService");
// if (ocmeport && isActive[0]?.value === "1") {
// serve(
// {
// fetch: app.fetch,
// port: Number(ocmeport),
// hostname: "0.0.0.0",
// },
// (info) => {
// createLog(
// "info",
// "LST",
// "server",
// `Ocme section is listening on http://${info.address}:${info.port}`,
// );
// },
// );
// }
const port =
process.env.NODE_ENV === "development"
? process.env.VITE_SERVER_PORT
: process.env.PROD_PORT;
const ocmeport = process.env.OCME_PORT;
serve(
{
fetch: app.fetch,
@@ -275,10 +323,6 @@ serve(
},
);
/**
* Only for ocme until we get them switched over to the single port setup.
*/
// const setting = await db.select().from(settings);
const setting = serverSettings;
const isActive = setting.filter((n) => n.name === "ocmeService");
if (ocmeport && isActive[0]?.value === "1") {