Skip to content

Commit

Permalink
get API_GATEWAY env from vite
Browse files Browse the repository at this point in the history
  • Loading branch information
j8seangel committed Sep 4, 2024
1 parent de9ae54 commit 96fc260
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions libs/api-client/src/config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
/// <reference types="vite/client" />

export const API_GATEWAY =
process.env.API_GATEWAY ||
process.env.REACT_APP_API_GATEWAY ||
process.env.NEXT_PUBLIC_API_GATEWAY ||
import.meta?.env?.API_GATEWAY || // vite bundled libraries
'https://gateway.api.dev.globalfishingwatch.org'

export const USER_TOKEN_STORAGE_KEY = 'GFW_API_USER_TOKEN'
Expand Down
2 changes: 1 addition & 1 deletion libs/api-client/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"module": "commonjs",
"module": "es2022",
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitOverride": true,
Expand Down

0 comments on commit 96fc260

Please sign in to comment.