Files
lightning/doc/guides/Developer-s Guide/developers-guide.md
Adi Shankara e83782f5de doc: Add guides and GitHub workflow for doc sync
This PR:
- adds all the guides (in markdown format) that is published at https://docs.corelightning.org/docs
- adds a github workflow to sync any future changes made to files inside the guides folder
- does not include API reference (json-rpc commands). Those will be handled in a separate PR since they're used as manpages and will require a different github workflow

Note that the guides do not exactly map to their related files in doc/, since we reorganized the overall documentation structure on readme for better readability and developer experience. For example, doc/FUZZING.md and doc/HACKING.md#Testing are merged into testing.md in the new docs. As on the creation date of this PR, content from each of the legacy documents has been synced with the new docs. Until this PR gets merged, I will continue to push any updates made to the legacy documents into the new docs.

If this looks reasonable, I will add a separate PR to clean up the legacy documents from doc/ (or mark them deprecated) to avoid redundant upkeep and maintenance.

Changelog-None
2023-06-06 12:40:19 +09:30

53 lines
1.1 KiB
Markdown

---
title: "Setting up a dev environment"
slug: "developers-guide"
excerpt: "Get up and running in your local environment with essential tools and libraries in your preferred programming language."
hidden: false
createdAt: "2022-11-18T14:28:23.407Z"
updatedAt: "2023-02-08T11:42:44.759Z"
---
## Using `startup_regtest.sh`
The Core Lightning project provides a script `startup_regtest.sh` to simulate the Lightning Network in your local dev environment. The script starts up some local nodes with bitcoind, all running on regtest and makes it easier to test things out, by hand.
Navigate to `contrib` in your Core Lightning directory:
```shell
cd contrib
```
Load the script, using `source` so it can set aliases:
```shell
source contrib/startup_regtest.sh
```
Start up the nodeset:
```shell
start_ln 3
```
Connect the nodes. The `connect a b` command connects node a to b:
```shell
connect 1 2
```
When you're finished, stop:
```shell
stop_ln
```
Clean up the lightning directories:
```shell
destroy_ln
```
## Using Polar
[Polar](https://lightningpolar.com/) offers a one-click setup of Lightning Network for local app development & testing.