diff --git a/backend/.env.example b/backend/.env.example index 4da92c7..9a90760 100644 --- a/backend/.env.example +++ b/backend/.env.example @@ -13,6 +13,8 @@ CLIENT_SECRET=[client secret] API_KEY=[api-key id]:[api-key] # pre-shared token SECRET=some_random_long_string +FRONTEND_URL=http://localhost:3001 # URL to the frontend used for proxying + REDIS_HOST=localhost REDIS_PORT=6379 REDIS_PASS="" diff --git a/backend/src/routes/index.ts b/backend/src/routes/index.ts index 1c579c3..9e9df2c 100644 --- a/backend/src/routes/index.ts +++ b/backend/src/routes/index.ts @@ -39,5 +39,6 @@ const setupGraphql = (app: express.Application, tools: Tools) => { export const setupRoutes = (app: express.Application, tools: Tools) => { setupGraphql(app, tools); - app.use("/", proxy("http://localhost:3001")); + const frontend_url = process.env.FRONTEND_URL || "http://localhost:3001"; + app.use("/", proxy(frontend_url)); };