IO-3515 Additional packages and initial route &n simple queue polling.
This commit is contained in:
@@ -125,6 +125,8 @@ const applyRoutes = ({ app }) => {
|
||||
app.use("/payroll", require("./server/routes/payrollRoutes"));
|
||||
app.use("/sso", require("./server/routes/ssoRoutes"));
|
||||
app.use("/integrations", require("./server/routes/intergrationRoutes"));
|
||||
app.use("/ai", require("./server/routes/aiRoutes"));
|
||||
|
||||
|
||||
// Default route for forbidden access
|
||||
app.get("/", (req, res) => {
|
||||
@@ -438,6 +440,11 @@ const main = async () => {
|
||||
try {
|
||||
await server.listen(port);
|
||||
logger.log(`Server started on port ${port}`, "INFO", "api");
|
||||
|
||||
// Start SQS polling for Textract notifications
|
||||
const { startSQSPolling } = require("./server/ai/bill-ocr/bill-ocr");
|
||||
startSQSPolling();
|
||||
logger.log(`Started SQS polling for Textract notifications`, "INFO", "api");
|
||||
} catch (error) {
|
||||
logger.log(`Server failed to start on port ${port}`, "ERROR", "api", null, { error: error.message });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user