Files
goodpackagerepo/frontend/next.config.js
2026-01-08 23:39:26 +00:00

26 lines
607 B
JavaScript

/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'standalone',
async rewrites() {
// Get backend URL from environment, fallback to localhost for development
const backendUrl = process.env.BACKEND_URL || 'http://backend:5000';
return [
{
source: '/api/:path*',
destination: `${backendUrl}/:path*`,
},
{
source: '/auth/:path*',
destination: `${backendUrl}/auth/:path*`,
},
{
source: '/v1/:path*',
destination: `${backendUrl}/v1/:path*`,
},
];
},
}
module.exports = nextConfig