Linking backend data to frontend

This commit is contained in:
iv_vuytsik
2025-10-15 19:49:19 +03:00
parent ea1f50c1b8
commit 2b19ed246b
28 changed files with 959 additions and 385 deletions

28
frontend/next.config.js Normal file
View File

@@ -0,0 +1,28 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
outputFileTracingExcludes: {
'./**': ['./assets/big-models/**/*'],
},
async rewrites() {
const backend = process.env.BACKEND_URL || 'http://127.0.0.1:8000/api/v1'
return [
{
source: '/static-models/:path*',
destination: '/api/big-models/:path*',
},
{
source: '/api/v1/account/user',
destination: `${backend}/account/user/`,
},
{
source: '/api/v1/:path*',
destination: `${backend}/:path*`,
},
]
},
experimental: {
webpackBuildWorker: false,
},
}
module.exports = nextConfig