clip / apps /frontend /next.config.mjs
Husr's picture
first commit
d988ae4
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
env: {
NEXT_PUBLIC_URL: process.env.NEXT_PUBLIC_URL,
PUBLIC_SOCKET_URL: process.env.PUBLIC_SOCKET_URL
},
async rewrites() {
const backendUrl = process.env.DOCKER_BACKEND_URL || 'http://127.0.0.1:3001';
return [
{
source: '/api/:path*',
destination: `${backendUrl}/api/:path*` // Backend is co-located with the frontend in the Space image
},
];
},
};
export default nextConfig;