[build] command = "npm run build:client" publish = "dist" [functions] directory = "netlify/functions" node_bundler = "esbuild" included_files = ["src/server/**"] # Redirecionar chamadas de API para a Serverless Function [[redirects]] from = "/api/*" to = "/.netlify/functions/api/:splat" status = 200 force = true # Redirecionar uploads para a function também (pois o Express serve estáticos em /uploads, embora em serverless isso seja efêmero/lento, é o fallback) [[redirects]] from = "/uploads/*" to = "/.netlify/functions/api/uploads/:splat" status = 200 # Wildcard para SPA (React Router) - deve ser o último [[redirects]] from = "/*" to = "/index.html" status = 200