No description
Find a file
2020-04-14 13:11:42 -04:00
.vscode chore: add configs for eslint, prettier, import-sorter 2020-04-09 12:48:03 -04:00
app feat: add multi-language support 2020-04-14 13:11:42 -04:00
proto rewrite backend and add loop proxy 2020-04-07 18:39:55 -04:00
.gitignore chore: add .env.local for environment local vars 2020-04-14 11:32:21 -04:00
config.go rewrite backend and add loop proxy 2020-04-07 18:39:55 -04:00
go.mod chore: add configs for eslint, prettier, import-sorter 2020-04-09 12:48:03 -04:00
go.sum rewrite backend and add loop proxy 2020-04-07 18:39:55 -04:00
proxy.go rewrite backend and add loop proxy 2020-04-07 18:39:55 -04:00
README.md chore: add .env.local for environment local vars 2020-04-14 11:32:21 -04:00
shustar.go rewrite backend and add loop proxy 2020-04-07 18:39:55 -04:00

This document is currently a scratchpad for developer setup and temporary hacks to run the project. It will be made more user-friendly in the future

Requirements: Go, protoc, nodejs

One-time Setup

Create certificate for browser to backend proxy communication

openssl genrsa -out https.key 2048
openssl req -new -x509 -key https.key -out https.cert -days 365

Install client app dependencies

npm install -g yarn # if yarn isn't already installed
cd app/
yarn

Development

  • Spin up a local regtest env with nautilus and loopd (See docker-regtest)
  • Create a .env.local file in the app/ directory with the following content. Replace <macaroon> with the HEX encoded admin.macaroon of the LND node to connect to
    REACT_APP_DEV_MACAROON=<macaroon>
    REACT_APP_DEV_HOST=http://localhost:3000
    
  • Start backend server, updating the ports for the LND and Loop nodes if necessary
    go run . --lndhost=localhost:10011 --loophost=localhost:11010
    
  • Run the client app in a separate terminal
    cd app
    yarn start
    

Open browser at http://localhost:3000

Testing

  • Run all unit tests and output coverage
    yarn test:ci
    
  • Run tests on locally modified files in watch mode
    yarn test