fix(capture): wire bootstrapAutoStart() + add missing captureManager/MAM_API_URL/server (regression from earlier conflict resolution)

This commit is contained in:
Zac Gaetano 2026-05-18 09:25:55 -04:00
parent d8229e6f3f
commit a9c16d9509

View file

@ -2,11 +2,13 @@ import express from 'express';
import cors from 'cors';
import dotenv from 'dotenv';
import captureRoutes from './routes/capture.js';
import captureManager from './capture-manager.js';
dotenv.config();
const app = express();
const PORT = process.env.PORT || 3001;
const MAM_API_URL = process.env.MAM_API_URL || 'http://mam-api:3000';
// Middleware
app.use(cors());
@ -21,8 +23,9 @@ app.get('/health', (req, res) => {
app.use('/capture', captureRoutes);
// Start server
app.listen(PORT, () => {
const server = app.listen(PORT, () => {
console.log(`Wild Dragon Capture Service listening on port ${PORT}`);
bootstrapAutoStart();
});
async function bootstrapAutoStart() {