feat: rewire routes to BullMQ and speed up documents page

This commit is contained in:
ff
2026-04-13 20:43:21 -04:00
parent 4e981c644f
commit 05a8a220bd
5 changed files with 171 additions and 526 deletions

View File

@@ -2,6 +2,8 @@ import app from "./app";
import dotenv from "dotenv";
import http from "http";
import { initSocket } from "./socket";
import { startSeleniumWorker } from "./queue/workers/seleniumWorker";
import { startOcrWorker } from "./queue/workers/ocrWorker";
dotenv.config();
@@ -19,6 +21,10 @@ const server = http.createServer(app);
// Initialize socket.io on this server
initSocket(server);
// Start BullMQ workers (requires Redis at localhost:6379)
startSeleniumWorker();
startOcrWorker();
server.listen(PORT, HOST, () => {
console.log(
`✅ Server running in ${NODE_ENV} mode at http://${HOST}:${PORT}`