- node 22.x (and npm)
- docker
- docker compose
- Install all the dependencies from the root folder
npm install --workspaces
- Start services with docker compose
cd server-backend/dev
docker compose up
- Initialize blockchain and lightning nodes
server-backend/dev/lightning-setup.sh
- Build shared module
cd shared
npm run build
- Start backend
cd server-backend
npm run start:dev
- Start frontend
cd swap-frontend
npm run start:dev
- Open http://localhost:7080 in your browser
- You can check the API's' Swagger at http://localhost:7081/docs
By sourcing server-backend/dev/dev-aliases.sh
you can get access to some useful commands, e.g.:
source server-backend/dev/dev-aliases.sh
# mine N blocks
40swap-bitcoin-cli -generate $N
# pay lightning invoice from user node
40swap-user-lncli payinvoice $INVOICE
# send bitcoins to adddress
40swap-bitcoin-cli -named sendtoaddress address=$ADDR amount=$AMOUNT fee_rate=25