Skip to content

Commit

Permalink
constants need this to build sites
Browse files Browse the repository at this point in the history
  • Loading branch information
horacioh committed Mar 1, 2024
1 parent c23c1d9 commit 191beaf
Showing 1 changed file with 31 additions and 10 deletions.
41 changes: 31 additions & 10 deletions frontend/packages/shared/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,36 @@
export const IS_PROD_DESKTOP = !!import.meta.env?.PROD
export const IS_DEV_DESKTOP = !!import.meta.env?.DEV

export const P2P_PORT = import.meta.env.VITE_DESKTOP_P2P_PORT || 55000
export const HTTP_PORT = import.meta.env.VITE_DESKTOP_HTTP_PORT || 55001
export const GRPC_PORT = import.meta.env.VITE_DESKTOP_GRPC_PORT || 55002
export const P2P_PORT =
(import.meta.env && import.meta.env.VITE_DESKTOP_P2P_PORT) ||
process.env.VITE_DESKTOP_P2P_PORT ||
55000
export const HTTP_PORT =
(import.meta.env && import.meta.env.VITE_DESKTOP_HTTP_PORT) ||
process.env.VITE_DESKTOP_HTTP_PORT ||
55001
export const GRPC_PORT =
(import.meta.env && import.meta.env.VITE_DESKTOP_GRPC_PORT) ||
process.env.VITE_DESKTOP_GRPC_PORT ||
55002

export const ELECTRON_HTTP_PORT =
import.meta.env.VITE_ELECTRON_HTTP_PORT || 55003

export const HOSTNAME = import.meta.env.VITE_DESKTOP_HOSTNAME
export const DESKTOP_APPDATA = import.meta.env.VITE_DESKTOP_APPDATA || 'Mintter'

export const VERSION = import.meta.env.VITE_VERSION || '0.0.0'
(import.meta.env && import.meta.env.VITE_ELECTRON_HTTP_PORT) ||
process.env.VITE_ELECTRON_HTTP_PORT ||
55003

export const HOSTNAME =
(import.meta.env && import.meta.env.VITE_DESKTOP_HOSTNAME) ||
process.env.VITE_DESKTOP_HOSTNAME
export const DESKTOP_APPDATA =
(import.meta.env && import.meta.env.VITE_DESKTOP_APPDATA) ||
process.env.VITE_DESKTOP_APPDATA ||
'Mintter'

export const VERSION =
(import.meta.env && import.meta.env.VITE_VERSION) ||
process.env.VITE_VERSION ||
'0.0.0'

export const API_HTTP_URL = `${HOSTNAME}:${HTTP_PORT}`
export const API_FILE_UPLOAD_URL = `${HOSTNAME}:${HTTP_PORT}/ipfs/file-upload`
Expand All @@ -27,4 +46,6 @@ export const LIGHTNING_API_URL = IS_PROD_DESKTOP
? 'https://ln.mintter.com'
: 'https://ln.testnet.mintter.com'

export const VITE_DESKTOP_SENTRY_DSN = import.meta.env.VITE_DESKTOP_SENTRY_DSN
export const VITE_DESKTOP_SENTRY_DSN =
(import.meta.env && import.meta.env.VITE_DESKTOP_SENTRY_DSN) ||
process.env.VITE_DESKTOP_SENTRY_DSN

0 comments on commit 191beaf

Please sign in to comment.