Added Connectwise Compnay Syncing
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user