astock-agent/frontend/next.config.js
2026-04-08 00:36:55 +08:00

21 lines
415 B
JavaScript

/** @type {import('next').NextConfig} */
const backendUrl = process.env.BACKEND_URL || "http://localhost:8000";
const nextConfig = {
output: "standalone",
async rewrites() {
return [
{
source: "/api/:path*",
destination: `${backendUrl}/api/:path*`,
},
{
source: "/ws",
destination: `${backendUrl}/ws`,
},
];
},
};
module.exports = nextConfig;