Removed the API route in favour of server side rendering; Updated documentation to list environment variables (#9)
- Use server side rendering in the `getServerEnv` library function, rather than using the API route - Updated `README.md` to list the relevant environment variables for the frontend and backend - Updated `NETWORKING.md` to reflect the changes made in `docker-compose.yaml`
This commit is contained in:
parent
ec158c0cdf
commit
f6ae79b0b5
4 changed files with 41 additions and 50 deletions
16
ui/app/api/env/route.ts
vendored
16
ui/app/api/env/route.ts
vendored
|
|
@ -1,16 +0,0 @@
|
|||
import process from 'process';
|
||||
import { NextResponse } from 'next/server';
|
||||
|
||||
// Enable the Runtime
|
||||
export const runtime = "edge"
|
||||
|
||||
export async function GET(_request: Request) {
|
||||
// Access environment variables
|
||||
const envVars = {
|
||||
'BACKEND_API_URL': process.env.BACKEND_API_URL ?? process.env.NEXT_PUBLIC_API_URL,
|
||||
'BACKEND_WS_URL': process.env.BACKEND_WS_URL ?? process.env.NEXT_PUBLIC_WS_URL
|
||||
}
|
||||
|
||||
// Return the environment variables as a JSON response
|
||||
return NextResponse.json(envVars);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue