Tree:
8d03901565
bdk-0.11
bip39
burn-down-handle
chore/actor-names-in-logs
chore/bump-bdk-0.15
chore/bump-maia
chore/changelog-entries
chore/leaner-release-process
chore/remove-next-dependency
chore/sql-format
chore/use-esplora-backend
compile-for-aarch64
contact-taker-before-changing-cfd-state
debug-collab-settlement
debug-statements
dependabot/cargo/anyhow-1.0.52
dependabot/cargo/clap-3.0.0-rc.8
dependabot/cargo/reqwest-0.11.8
dependabot/github_actions/docker/login-action-1.12.0
dependabot/npm_and_yarn/taker-frontend/types/node-17.0.4
dependabot/npm_and_yarn/taker-frontend/types/react-17.0.38
dependabot/npm_and_yarn/taker-frontend/vite-2.7.6
failing-clippy
feature/actor-custom-derive
feature/concurrent-roll-over
feature/delete-wallet-cache-on-failure
feature/force-stop-button
feature/integration-tests
feature/reconnect-button
feature/rollover-event-sourcing
feature/supervised-connection
fix-bad-api-calls
fix-olivia-event-id
fix/incorrect-tracing-use
fix/sql-oddness
frontend-backend
heartbeat-event-source
hotfix/0.1.1
hotfix/0.3.1
initial-taker-ui
integrate-protocol-maker-side
maker-taker-cfd-setup-messaging
master
new-http-api
no-buy-button-while-setting-up-cfd
no-contract-setup-message
pAndLAndPayout
patch-1
patch-2
reconnect-to-maker
refactor/no-log-handler
release/0.3.1
release/0.3.2
remove-long-heartbeat-interval-in-debug-mode
resilient-broadcast
rollover-test
rollover-test-2
shutdown-taker-if-no-maker-present
staging
state-machine
temporary-fast-timelocks
test-force-close-without-fake-clock
testing
ui-rampup
update-blockstream-electrum-server-url
upload-correct-windows-binary
verify-transactions
0.1.0
0.1.1
0.1.2
0.2.0
0.3.0
0.3.1
0.3.2
preview
${ noResults }
2 Commits (8d0390156598dc0d38eee5d34e47daf8bc74f616)
Author | SHA1 | Message | Date |
---|---|---|---|
Thomas Eizinger |
5babf9d12f
|
Put sources under src/
The only thing that has to stay in the root is the `index.html` file, otherwise the dev server doesn't pick it up. Also make sure our frontend tests actually run and pass in CI. |
3 years ago |
Thomas Eizinger |
aa2b4fb0ce
|
Remove hardcoded absolute URLs from the frontend source code
Achieving this is rather tricky due to the nature of our multi-page project. We need to solve several problems: 1. We want a single npm project that produces two independent bundles. 2. We want our paths to be relative to the serving URL, that is `localhost:3000` in development and in production, whereever the backend is hosted. 3. We have independent backends, hence requiring different `server.proxy` configurations. We solve (1) by using vite (already prior to this commit). To solve (2), we simply remove all absolute URLs from the code and replace them with absolute paths which will be relative to the serving host. This creates a problem: Prior to this patch, we only have one devServer running that would serve both frontends under a different sub-directory (/maker and /taker). Even though this worked, it was impossible to create a proxy configuration that would: - Forward API requests from `/maker` to `localhost:8001` - Forward API requests from `/taker` to `localhost:8000` Because in both cases, the API requests would simply start with `/api`, making them indistinguishable from each other. To solve this problem, we needed to serve each frontend separately. Doing so would allow us to have dedicated proxy server configurations and forward the requests to `/api` to the correct backend. Unfortunately, the intuitive approach of solving this (have a `maker.html` and `taker.html` file) does not work. With React being a client-side routing framework, full page-reloads would be broken with this approach because they would be looking for an `index.html` file which doesn't exist. To work around this issue, our final solution is: 1. Use a dynamic ID to reference the desired app from within the `index.html`: `__app__` 2. Use a vite plugin to resolve this ID to the file in question: `maker.tsx` or `taker.tsx` Fixes #6. |
3 years ago |