feat: rewire routes to BullMQ and speed up documents page
This commit is contained in:
@@ -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}`
|
||||
|
||||
Reference in New Issue
Block a user