Skip to content

Conversation

rohit-nair
Copy link
Contributor

@rohit-nair rohit-nair commented May 21, 2022

Implements a new script (yarn develop) that lets developers to do
LiT frontend client development without having to setup an lnd backend.
This script uses the mock responses configured in sampleData to resolve API
requests.

Limitations:

  • The implementation depends on sampleData to be up-to-date as the APIs
    evolve.
  • Currently it only supports GET requests.

Alternatives considered:

  • Use REACT_APP_DEV_HOST to point to a testnet public server so as to avoid
    configuring and running lnd.
  • Set up a webpack devserver to proxy responses to a node server running
    locally that in-turn reads mock responses configured as <endpoint>.json
    files, ex GetInfo.json, and sends it as response.

Copy link
Member

@jamaljsr jamaljsr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no objections to this update. The changes are minimal and I can see the benefits of using this. Thanks for the PR 👍

@rohit-nair rohit-nair marked this pull request as ready for review May 29, 2022 07:56
@rohit-nair rohit-nair requested a review from jamaljsr May 29, 2022 08:00
@lightninglabs-deploy
Copy link

@jamaljsr: review reminder

Copy link
Member

@jamaljsr jamaljsr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK LGTM. Thanks 👍

This implements a new script (`yarn develop`) that lets developers to do
LiT frontend client development without having to setup an `lnd` backend.
This script uses the mock responses configured in `sampleData` to resolve API
requests.

Limitations:
* The implementation depends on `sampleData` to be up-to-date as the APIs
  evolve.
* Currently it only supports `GET` requests.

Alternatives considered:
* Use `REACT_APP_DEV_HOST` to point to a `testnet` public server so as to avoid
  configuring and running `lnd`.
* Set up a webpack devserver to proxy responses to a node server running
  locally that in-turn reads mock responses configured as `<endpoint>.json`
  files, ex `GetInfo.json`, and sends it as response.
@jamaljsr jamaljsr force-pushed the rn/develop-script branch from 8136bb5 to 7bacc8d Compare June 2, 2022 07:12
@jamaljsr
Copy link
Member

jamaljsr commented Jun 2, 2022

I rebased via Github to save you from having to do it manually. Going to merge once these flaky workflows stop failing.

@jamaljsr jamaljsr merged commit 43b251e into lightninglabs:master Jun 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants