This commit is contained in:
cdricms
2025-01-15 11:54:39 +01:00
parent d18245736f
commit 683a8c3133
13 changed files with 165 additions and 69 deletions

View File

@@ -4,11 +4,16 @@ const nextConfig: NextConfig = {
/* config options here */
output: "standalone",
async redirects() {
if (!process.env.BACKEND_PORT) {
throw new Error(
"Environment variable BACKEND_PORT is not defined.",
);
}
return [
{
destination: "/api",
source: `http://localhost:${process.env.BACKEND_PORT}`,
permanent: true,
source: "/api",
destination: `http://localhost:${process.env.BACKEND_PORT}`,
permanent: false,
},
];
},