From 4d4db02af9776784a14e2f3f242a3d1db0fe3f00 Mon Sep 17 00:00:00 2001 From: "mati108@gmail.com" <34651529+matbenitez@users.noreply.github.com> Date: Wed, 17 Oct 2018 11:39:24 -0300 Subject: [PATCH] Adding environment variable for graphql endpoint --- server/.env.example | 1 + server/src/index.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/server/.env.example b/server/.env.example index 6abf4db49..1cb345459 100644 --- a/server/.env.example +++ b/server/.env.example @@ -1,3 +1,4 @@ +GRAPHQL_API_URL='https://dev-app.advancedalgos.net/graphql' TEAMS_API_URL='https://teams-api.advancedalgos.net/graphql' USERS_API_URL='https://users-api.advancedalgos.net/graphql' KEYVAULT_API_URL='https://keyvault-api.advancedalgos.net/graphql' diff --git a/server/src/index.js b/server/src/index.js index f26cd824f..3889ddc77 100644 --- a/server/src/index.js +++ b/server/src/index.js @@ -60,7 +60,7 @@ async function run () { settings: { 'editor.theme': 'light' }, tabs: [ { - endpoint: 'http://localhost:4100/graphql', + endpoint: process.env.GRAPHQL_API_URL, query: defaultQuery } ] @@ -72,7 +72,7 @@ async function run () { app.use(cors()) app.listen(4100) - logger.info('Server running. Open http://localhost:4100/graphql to run queries.') + logger.info(`Server running. Open ${process.env.GRAPHQL_API_URL} to run queries.`) } try {