/** @type {import('next').NextConfig} */ const nextConfig = { output: 'standalone', async rewrites() { // In production/Docker, proxy /api to backend on port 3001 if (process.env.NODE_ENV === 'production') { return [ { source: '/api/:path*', destination: 'http://localhost:3001/api/:path*', }, ]; } return []; }, }; module.exports = nextConfig;