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' }