Files
latosa-escrima/frontend/next.config.ts
cdricms 683a8c3133 Yes
2025-01-15 11:54:39 +01:00

23 lines
436 B
TypeScript

import type { NextConfig } from "next";
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 [
{
source: "/api",
destination: `http://localhost:${process.env.BACKEND_PORT}`,
permanent: false,
},
];
},
};
export default nextConfig;