🔧 API Route Format: - Add /api/simple.js using standard Vercel function format - Add /api/hello.ts using proper Next.js API route format - Install Next.js and types for proper API route support 🧪 Testing Multiple Formats: - JavaScript endpoint: /api/simple.js - TypeScript endpoint: /api/hello.ts - Both use traditional req/res pattern instead of NextRequest/NextResponse This should help identify the correct API format for Vercel functions.
9 lines
No EOL
285 B
JavaScript
9 lines
No EOL
285 B
JavaScript
export default function handler(req, res) {
|
|
res.status(200).json({
|
|
message: 'Simple JS endpoint works!',
|
|
method: req.method,
|
|
timestamp: new Date().toISOString(),
|
|
environment: process.env.NODE_ENV || 'unknown',
|
|
has_database_url: !!process.env.DATABASE_URL
|
|
});
|
|
}
|