mirror of
https://github.com/KLogicHQ/nats-console.git
synced 2026-10-12 07:47:56 +00:00
31 lines
764 B
TypeScript
31 lines
764 B
TypeScript
import type { NextConfig } from 'next';
|
|
|
|
const nextConfig: NextConfig = {
|
|
output: 'standalone',
|
|
transpilePackages: ['@nats-console/shared'],
|
|
devIndicators: false,
|
|
|
|
// Proxy API requests to the backend
|
|
// In single-container mode: API is at localhost:3001
|
|
// In multi-container mode: API_URL env var points to the API service
|
|
async rewrites() {
|
|
const apiUrl = process.env.API_URL || 'http://localhost:3001';
|
|
return [
|
|
{
|
|
source: '/api/:path*',
|
|
destination: `${apiUrl}/api/:path*`,
|
|
},
|
|
{
|
|
source: '/health/:path*',
|
|
destination: `${apiUrl}/health/:path*`,
|
|
},
|
|
{
|
|
source: '/ws/:path*',
|
|
destination: `${apiUrl}/ws/:path*`,
|
|
},
|
|
];
|
|
},
|
|
};
|
|
|
|
export default nextConfig;
|