Sivaneshakumar commited on
Commit
76dd92e
·
1 Parent(s): 33632eb

fix: use standard Next.js directory structure for Vercel

Browse files
Files changed (1) hide show
  1. frontend/next.config.js +3 -1
frontend/next.config.js CHANGED
@@ -1,11 +1,13 @@
1
  /** @type {import('next').NextConfig} */
 
 
2
  const nextConfig = {
3
  reactStrictMode: true,
4
  async rewrites() {
5
  return [
6
  {
7
  source: "/api/v1/:path*",
8
- destination: "http://localhost:8000/api/v1/:path*",
9
  },
10
  ];
11
  },
 
1
  /** @type {import('next').NextConfig} */
2
+ const apiBase = process.env.NEXT_PUBLIC_API_URL || "http://localhost:8000/api/v1";
3
+
4
  const nextConfig = {
5
  reactStrictMode: true,
6
  async rewrites() {
7
  return [
8
  {
9
  source: "/api/v1/:path*",
10
+ destination: `${apiBase}/:path*`,
11
  },
12
  ];
13
  },