Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 2 additions & 34 deletions backend/api/index.ts
Original file line number Diff line number Diff line change
@@ -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']
});
}
export default app;