feat(app): order schdeuler
This commit is contained in:
11
app/main.ts
11
app/main.ts
@@ -19,10 +19,13 @@ import { sendNotify } from "./src/pkg/utils/notify.js";
|
||||
import { toNodeHandler } from "better-auth/node";
|
||||
import { auth } from "./src/pkg/auth/auth.js";
|
||||
import { apiHitMiddleware } from "./src/pkg/middleware/apiHits.js";
|
||||
import { setupIoServer } from "./src/ws/server.js";
|
||||
import { schedulerManager } from "./src/internal/logistics/controller/schedulerManager.js";
|
||||
|
||||
const main = async () => {
|
||||
const env = validateEnv(process.env);
|
||||
const PORT = Number(env.VITE_PORT) || 4200;
|
||||
|
||||
//create the logger
|
||||
const log = createLogger({ module: "system", subModule: "main start" });
|
||||
|
||||
@@ -130,16 +133,18 @@ const main = async () => {
|
||||
express.static(join(__dirname, "../frontend/dist"))
|
||||
);
|
||||
|
||||
// server setup
|
||||
const server = createServer(app);
|
||||
|
||||
// register app
|
||||
setupRoutes(app, basePath);
|
||||
|
||||
// ws stuff
|
||||
|
||||
// ws + server stuff
|
||||
const server = createServer(app);
|
||||
setupIoServer(server, basePath);
|
||||
|
||||
// sub systems
|
||||
printers();
|
||||
schedulerManager();
|
||||
|
||||
// start the server up
|
||||
server.listen(PORT, "0.0.0.0", () =>
|
||||
|
||||
Reference in New Issue
Block a user