Spaces:
Running
Running
Download frontend/next.config.js from akhaliq/anycoder: direct link, hf CLI and curl.
- Browser
- Download file 701 Bytes
-
https://huggingface.co/spaces/akhaliq/anycoder/resolve/b42dfef211ddf494026277a737014987cfdc79c5/frontend/next.config.js
- Command line
-
hf download hf://spaces/akhaliq/anycoder@b42dfef211ddf494026277a737014987cfdc79c5/frontend/next.config.js
-
curl -L -o next.config.js https://huggingface.co/spaces/akhaliq/anycoder/resolve/b42dfef211ddf494026277a737014987cfdc79c5/frontend/next.config.js
701 Bytes
| /** @type {import('next').NextConfig} */ | |
| const nextConfig = { | |
| output: 'standalone', | |
| reactStrictMode: true, | |
| env: { | |
| NEXT_PUBLIC_API_URL: process.env.NEXT_PUBLIC_API_URL || 'http://localhost:8000', | |
| }, | |
| async rewrites() { | |
| // In Docker Space, proxy /api/* requests to backend on port 8000 | |
| // This allows frontend (7860) to communicate with backend (8000) internally | |
| const API_HOST = process.env.BACKEND_HOST || 'http://localhost:8000'; | |
| return [ | |
| { | |
| source: '/api/:path*', | |
| destination: `${API_HOST}/api/:path*`, | |
| }, | |
| { | |
| source: '/ws/:path*', | |
| destination: `${API_HOST}/ws/:path*`, | |
| }, | |
| ]; | |
| }, | |
| } | |
| module.exports = nextConfig | |