fix(capture): wire bootstrapAutoStart() + add missing captureManager/MAM_API_URL/server (regression from earlier conflict resolution)
This commit is contained in:
parent
d8229e6f3f
commit
a9c16d9509
1 changed files with 4 additions and 1 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue