diff --git a/backend/api/index.ts b/backend/api/index.ts index 1974aa1..1e0e40c 100644 --- a/backend/api/index.ts +++ b/backend/api/index.ts @@ -1,35 +1,3 @@ -export default async function handler(req: any, res: any) { - // Health check - if (req.url === '/api/health') { - return res.status(200).json({ - status: 'OK', - timestamp: new Date().toISOString(), - environment: 'production', - database: 'configured' - }); - } +import app from '../src/app'; - // Database test endpoint - if (req.url === '/api/db-test') { - try { - return res.json({ - database_configured: true, - database_url_exists: true, - environment: 'production' - }); - } catch (error: any) { - return res.status(500).json({ - error: 'Database test failed', - message: error?.message || 'Unknown error' - }); - } - } - - // Default API response - return res.json({ - message: 'API is working', - method: req.method, - url: req.url, - endpoints: ['/api/health', '/api/db-test'] - }); -} \ No newline at end of file +export default app; \ No newline at end of file