"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const express_1 = require("express");
const index_1 = require("../index");
const index_2 = require("../index");
const router = (0, express_1.Router)();
router.get('/', async (req, res) => {
    try {
        await index_1.prisma.$queryRaw `SELECT 1`;
        await index_2.redis.ping();
        res.json({
            success: true,
            message: 'API is healthy',
            timestamp: new Date().toISOString(),
            services: {
                database: 'connected',
                redis: 'connected',
            },
        });
    }
    catch (error) {
        res.status(503).json({
            success: false,
            message: 'Service unavailable',
            timestamp: new Date().toISOString(),
            services: {
                database: 'disconnected',
                redis: 'disconnected',
            },
        });
    }
});
exports.default = router;
//# sourceMappingURL=health.js.map