wbobeirne / lightning-app-tutorial

A four part series with code that shows how to build your very own Lightning app!
28 stars 8 forks source link

Lightning App Tutorial

This is a step-by-step tutorial project for learning to build Lightning applications. It's broken out into 5 parts, which you can find as separate posts on Medium and branches here on GitHub.

If you'd rather read the code than a post, feel free to dive in directly with the following instructions:

Requirements

If you want an LND node but have trouble setting it up with LND directly, I suggest either following Pierre Rochard's Easiest Lightning Node guide, or downloading the Lightning App from Lightning Labs.

If you'd rather not deal with getting your hands on some Bitcoin or waiting for block times to open channels, you can setup your own simulated Lightning network cluster.

If you just want to fiddle around with this you can use Polar to setup your own local regtest network.

Setup the Project

Copy the environment configuration file with

cp .env.example .env

Edit the following fields in your new .env file with information about your node. You can get some help finding this info using this tool: https://lightningjoule.com/tools/node-info

If you don't know how to get these, this tool will tell you where to find these.

Development

Install dependencies and run the app with

npm install && npm run dev
# OR #
yarn && yarn dev

Building & Deploying

Coming soon.