Skip to content

Commit

Permalink
chore(landing): add envs for api's addrs
Browse files Browse the repository at this point in the history
  • Loading branch information
Satont committed May 28, 2024
1 parent d31eebf commit 051842e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion frontend/landing/src/api/gql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ const host = config.SITE_BASE_URL ?? 'localhost:3005'
const isDev = config.NODE_ENV === 'development'
const apiAddr = isDev ? `${host}/api` : 'api-gql:3009'

export const gqlUrl = `http://${apiAddr}/query`
export const gqlUrl = process.env.API_GQL_ADDR || `http://${apiAddr}/query`
4 changes: 2 additions & 2 deletions frontend/landing/src/api/twirp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ const host = config.SITE_BASE_URL ?? 'localhost:3005'
const isDev = config.NODE_ENV === 'development'
const apiAddr = isDev ? `${host}/api-old` : 'api:3002'

const baseUrl = `http://${apiAddr}/v1`
const baseUrl = process.env.API_ADDR || `http://${apiAddr}/v1`

const transport = new TwirpFetchTransport({
baseUrl,
sendJson: isDev
sendJson: isDev,
})

export const protectedClient = new ProtectedClient(transport)
Expand Down

0 comments on commit 051842e

Please sign in to comment.