deckhearth/api/health.ts

18 lines
526 B
TypeScript
Raw Normal View History

import { NextRequest, NextResponse } from 'next/server';
export default async function handler(req: NextRequest) {
return new NextResponse(JSON.stringify({
success: true,
message: 'API is working!',
timestamp: new Date().toISOString(),
environment: process.env.NODE_ENV || 'unknown',
has_database_url: !!process.env.DATABASE_URL,
has_jwt_secret: !!process.env.JWT_SECRET,
method: req.method,
url: req.url
}), {
status: 200,
headers: { 'Content-Type': 'application/json' },
});
}