chore: support react dev environment for Alby OAuth client

This commit is contained in:
Roland Bewick 2023-12-25 16:32:03 +07:00
parent 6bf2a4c681
commit cab4c020ec
2 changed files with 10 additions and 1 deletions

View file

@ -29,10 +29,14 @@ To get a new random Nostr key use `openssl rand -hex 32` or similar.
### Server (LND)
Create a Lightning Polar setup with two LND nodes and copy `.env.example` to `.env` and uncomment the Polar LND section.
Create a Lightning Polar setup with two LND nodes and uncomment the Polar LND section in your `.env` file.
`go run .` or `gow -e=go,mod,html,css run .` using [gow](https://github.com/mitranim/gow)
### Server (Alby Wallet API)
Generate a new OAuth client for <http://localhost:8080> from the [Alby developer portal](https://getalby.com/developer) and set `ALBY_CLIENT_ID` and `ALBY_CLIENT_SECRET` in your .env file.
### React Frontend (LND)
Go to `/frontend`
@ -40,6 +44,10 @@ Go to `/frontend`
1. `yarn install`
2. `yarn dev`
### React Frontend (Alby Wallet API)
Follow standard LND instructions. After logging in, you will be redirected to the wrong port (8080), so manually re-open <http://localhost:5173>.
### Testing
`go test`

View file

@ -7,6 +7,7 @@ export default defineConfig({
server: {
proxy: {
"/api": "http://localhost:8080",
"/alby": "http://localhost:8080",
},
},
});