25 lines
757 B
TypeScript
25 lines
757 B
TypeScript
|
|
import express from 'express';
|
||
|
|
import intentRoutes from './intent-routes.js';
|
||
|
|
import executionRoutes from './execution-routes.js';
|
||
|
|
import mirrorRoutes from './mirror-routes.js';
|
||
|
|
import adminRoutes from './admin-routes.js';
|
||
|
|
import routeRoutes from './route-routes.js';
|
||
|
|
import { circuitBreakerMiddleware, healthRoutes } from './observability.js';
|
||
|
|
|
||
|
|
const app: express.Express = express();
|
||
|
|
app.use(express.json());
|
||
|
|
app.use(circuitBreakerMiddleware);
|
||
|
|
app.use(intentRoutes);
|
||
|
|
app.use(executionRoutes);
|
||
|
|
app.use(routeRoutes);
|
||
|
|
app.use(mirrorRoutes);
|
||
|
|
app.use(adminRoutes);
|
||
|
|
app.use(healthRoutes);
|
||
|
|
|
||
|
|
const port = parseInt(process.env.PORT ?? '3001', 10);
|
||
|
|
app.listen(port, () => {
|
||
|
|
console.log(`Multi-chain execution API listening on port ${port}`);
|
||
|
|
});
|
||
|
|
|
||
|
|
export { app };
|