Added Connectwise Compnay Syncing

This commit is contained in:
2026-01-26 17:09:18 -06:00
parent 4524c0258a
commit 7748e6171b
19 changed files with 1783 additions and 9 deletions
+10
View File
@@ -1,5 +1,15 @@
import { refresh } from "./api/auth";
import app from "./api/server";
import { engine, PORT } from "./constants";
import { refreshCompanies } from "./modules/cw-utils/refreshCompanies";
import { events, setupEventDebugger } from "./modules/globalEvents";
// Setup global event debugger in non-production environments
if (Bun.env.NODE_ENV == "development") setupEventDebugger();
// Refresh the internal list of companies every minute
await refreshCompanies();
setInterval(() => refreshCompanies, 60 * 1000);
Bun.serve({
port: PORT,