mirror of
https://github.com/johndoe6345789/goodpackagerepo.git
synced 2026-04-24 13:54:59 +00:00
34 lines
795 B
JavaScript
34 lines
795 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://localhost:5000';
|
|
|
|
return [
|
|
{
|
|
source: '/auth/:path*',
|
|
destination: `${backendUrl}/auth/:path*`,
|
|
},
|
|
{
|
|
source: '/v1/:path*',
|
|
destination: `${backendUrl}/v1/:path*`,
|
|
},
|
|
{
|
|
source: '/admin/:path*',
|
|
destination: `${backendUrl}/admin/:path*`,
|
|
},
|
|
{
|
|
source: '/health',
|
|
destination: `${backendUrl}/health`,
|
|
},
|
|
{
|
|
source: '/schema',
|
|
destination: `${backendUrl}/schema`,
|
|
},
|
|
];
|
|
},
|
|
}
|
|
|
|
module.exports = nextConfig
|