diff --git a/ui/app/api/env/route.ts b/ui/app/api/env/route.ts new file mode 100644 index 0000000..b86f0b4 --- /dev/null +++ b/ui/app/api/env/route.ts @@ -0,0 +1,13 @@ +import { NextRequest, NextResponse } from 'next/server'; +import process from 'process'; + +export async function GET(request: NextRequest) { + // Access environment variables + const envVars = { + BACKEND_API_URL: process.env.BACKEND_API_URL, + BACKEND_WS_URL: process.env.BACKEND_WS_URL + } + + // Return the environment variables as a JSON response + return NextResponse.json(envVars); +} \ No newline at end of file diff --git a/ui/pages/api/env.ts b/ui/pages/api/env.ts deleted file mode 100644 index 31750b1..0000000 --- a/ui/pages/api/env.ts +++ /dev/null @@ -1,10 +0,0 @@ - -import process from 'process'; - -export default function handler(req, res) { - const envVars = { - BACKEND_API_URL: process.env.BACKEND_API_URL, - BACKEND_WS_URL: process.env.BACKEND_WS_URL - } - res.status(200).json(envVars); -}