mirror of
https://github.com/siteboon/claudecodeui.git
synced 2026-06-03 11:05:35 +08:00
22 lines
601 B
JavaScript
22 lines
601 B
JavaScript
import express from 'express';
|
|
import fs from 'fs';
|
|
import path from 'path';
|
|
import { fileURLToPath } from 'url';
|
|
import { dirname } from 'path';
|
|
|
|
const router = express.Router();
|
|
const __filename = fileURLToPath(import.meta.url);
|
|
const __dirname = dirname(__filename);
|
|
const installMode = fs.existsSync(path.join(__dirname, '../../../../.git')) ? 'git' : 'npm';
|
|
|
|
// Public health check endpoint (no authentication required)
|
|
router.get('/health', (req, res) => {
|
|
res.json({
|
|
status: 'ok',
|
|
timestamp: new Date().toISOString(),
|
|
installMode
|
|
});
|
|
});
|
|
|
|
export default router;
|