This commit is contained in:
MarkLo 2025-11-21 10:17:55 +08:00
parent dd02eda555
commit 710ff8c855
2 changed files with 10 additions and 3 deletions

View File

@ -10,10 +10,7 @@ import type {
Ticker,
} from "./types";
const API_URL = process.env.NEXT_PUBLIC_API_URL || "http://localhost:8000";
const apiClient = axios.create({
baseURL: API_URL,
headers: {
"Content-Type": "application/json",
},

View File

@ -3,6 +3,16 @@ import type { NextConfig } from "next";
const nextConfig: NextConfig = {
/* config options here */
reactCompiler: true,
async rewrites() {
return [
{
source: "/api/:path*",
destination: `${
process.env.API_URL || "http://backend:8000"
}/api/:path*`,
},
];
},
};
export default nextConfig;