20 lines
467 B
TypeScript
20 lines
467 B
TypeScript
import type { NextConfig } from "next";
|
|
|
|
const nextConfig: NextConfig = {
|
|
/* config options here */
|
|
async rewrites() {
|
|
// Only apply proxy in development environment
|
|
if (process.env.NODE_ENV === "development") {
|
|
return [
|
|
{
|
|
source: "/service/:path*",
|
|
destination: "http://localhost:8080/service/:path*", // assuming Go backend runs on port 8080
|
|
},
|
|
];
|
|
}
|
|
return [];
|
|
},
|
|
};
|
|
|
|
export default nextConfig;
|