Add AI DEV Node deployment foundation

This commit is contained in:
unknown
2026-07-13 10:33:21 +09:00
parent 6abcee3727
commit b90bfe35ca
23 changed files with 3978 additions and 0 deletions

38
server/routes/health.ts Normal file
View File

@@ -0,0 +1,38 @@
import { Router } from 'express';
import { ok } from '../http/apiResponse.js';
import { query } from '../db/pool.js';
export const healthRouter = Router();
export const platformStatusRouter = Router();
healthRouter.get('/health', (_req, res) => {
ok(res, {
status: 'UP',
service: 'acs-node',
});
});
platformStatusRouter.get('/healthz', (_req, res) => {
res.json({ ok: true });
});
platformStatusRouter.get('/db', async (_req, res) => {
try {
const result = await query<{ now: Date }>('SELECT now() AS now');
res.json({ ok: true, now: result.rows[0]?.now });
} catch (error) {
res.status(500).json({
ok: false,
error: error instanceof Error ? error.message : String(error),
});
}
});
platformStatusRouter.get('/s3', (_req, res) => {
res.json({
ok: true,
skipped: true,
reason: 'ACS does not currently use S3/MinIO storage.',
});
});

6
server/routes/index.ts Normal file
View File

@@ -0,0 +1,6 @@
import { Router } from 'express';
import { healthRouter } from './health.js';
export const apiRouter = Router();
apiRouter.use(healthRouter);