add services/capture/src/index.js
This commit is contained in:
parent
e0902acbb6
commit
febf394a81
1 changed files with 26 additions and 0 deletions
26
services/capture/src/index.js
Normal file
26
services/capture/src/index.js
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
import express from 'express';
|
||||
import cors from 'cors';
|
||||
import dotenv from 'dotenv';
|
||||
import captureRoutes from './routes/capture.js';
|
||||
|
||||
dotenv.config();
|
||||
|
||||
const app = express();
|
||||
const PORT = process.env.PORT || 3001;
|
||||
|
||||
// Middleware
|
||||
app.use(cors());
|
||||
app.use(express.json());
|
||||
|
||||
// Health check
|
||||
app.get('/health', (req, res) => {
|
||||
res.json({ status: 'ok' });
|
||||
});
|
||||
|
||||
// Routes
|
||||
app.use('/capture', captureRoutes);
|
||||
|
||||
// Start server
|
||||
app.listen(PORT, () => {
|
||||
console.log(`Wild Dragon Capture Service listening on port ${PORT}`);
|
||||
});
|
||||
Loading…
Reference in a new issue