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