All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
19 lines
540 B
TypeScript
19 lines
540 B
TypeScript
import { Hono } from 'hono';
|
|
import { refreshMonitoringCache } from './cache.js';
|
|
import monitoringRouter from './monitoring.js';
|
|
import targetsRouter from './targets.js';
|
|
import trendRouter from './trend.js';
|
|
|
|
const app = new Hono();
|
|
|
|
app.route('/monitoring', monitoringRouter);
|
|
app.route('/targets', targetsRouter);
|
|
app.route('/target', targetsRouter);
|
|
app.route('/trend', trendRouter);
|
|
|
|
// 启动时立即刷新缓存,之后每分钟刷新
|
|
refreshMonitoringCache();
|
|
setInterval(refreshMonitoringCache, 60 * 1000);
|
|
|
|
export default app;
|