- Replace complex Express-style handler with simple module.exports - Add separate API endpoints for better organization - Simplify vercel.json routing configuration - Remove ES modules to use CommonJS for Vercel compatibility - Add dedicated test API endpoint for debugging
30 lines
497 B
JSON
30 lines
497 B
JSON
{
|
|
"version": 2,
|
|
"routes": [
|
|
{
|
|
"src": "/api/test",
|
|
"dest": "/api/test.js"
|
|
},
|
|
{
|
|
"src": "/api/files/public",
|
|
"dest": "/api/files.js"
|
|
},
|
|
{
|
|
"src": "/api/files",
|
|
"dest": "/api/files.js"
|
|
},
|
|
{
|
|
"src": "/(.*\\.(css|js|json|svg|png|jpg|jpeg|gif|ico|woff|woff2|ttf|eot))",
|
|
"dest": "/$1"
|
|
},
|
|
{
|
|
"src": "/admin/(.*)",
|
|
"dest": "/admin/$1"
|
|
},
|
|
{
|
|
"src": "/(.*)",
|
|
"dest": "/index.html"
|
|
}
|
|
]
|
|
}
|