From 1170dcb06652828c815b8887c548a377803825f8 Mon Sep 17 00:00:00 2001 From: Chris Troutner Date: Wed, 15 Jul 2026 10:05:11 -0700 Subject: [PATCH] Adding env var to change back end --- .env.example | 3 +++ src/config/index.js | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .env.example diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..ec1faa7 --- /dev/null +++ b/.env.example @@ -0,0 +1,3 @@ +# psf-memo-db REST API base URL (no trailing slash). +# Used at build time by Create React App (must be prefixed with REACT_APP_). +REACT_APP_MEMO_DB_URL=http://localhost:5021 diff --git a/src/config/index.js b/src/config/index.js index d1f8ede..6e181b5 100644 --- a/src/config/index.js +++ b/src/config/index.js @@ -14,7 +14,9 @@ const config = { ghRepo: 'https://github.com/Permissionless-Software-Foundation/bch-wallet-web3-spa', radicleUrl: 'https://app.radicle.network/seeds/maple.radicle.garden/rad:git:hnrkd5cjwwb5tzx37hq9uqm5ubon7ee468xcy/remotes/hyyycncbn9qzqmobnhjq9rry6t4mbjiadzjoyhaknzxjcz3cxkpfpc', - backend: 'http://localhost:5021' + // Override at build time with REACT_APP_MEMO_DB_URL + // (e.g. https://api.mydomain.com). Default suits local memo-db. + backend: process.env.REACT_APP_MEMO_DB_URL || 'http://localhost:5021' }