Skip to content

Commit 734aa21

Browse files
committed
demo+connect: update README with instructions and screenshots
1 parent a3b95bb commit 734aa21

File tree

5 files changed

+37
-30
lines changed

5 files changed

+37
-30
lines changed

demos/connect-demo/README.md

Lines changed: 37 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,53 @@
1-
# Getting Started with Create React App
1+
# LNC Demo - Basic Connect
22

3-
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
3+
This demo showcases the most basic flow to connect from a browser to a Lightning Terminal
4+
(litd) node using the `lnc-web` NPM package.
45

5-
## Available Scripts
6+
## Running the demo
67

7-
In the project directory, you can run:
8+
To run the demo, you'll need to have NodeJS installed and a Lightning Terminal node
9+
accessible that you can obtain a pairing phrase from.
810

9-
### `npm start`
11+
1. Clone this repo
12+
```sh
13+
$ git clone https://github.com/lightninglabs/lnc-web.git
14+
$ cd lnc-web/demos/connect-demo
15+
```
16+
2. Install the dependencies
17+
```sh
18+
$ npm install
19+
```
20+
3. Start the web app
21+
```sh
22+
$ npm start
23+
```
24+
Your browser should open to http://localhost:3000 and you should see the home page
25+
below
1026

11-
Runs the app in the development mode.\
12-
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
27+
## Screenshots
1328

14-
The page will reload if you make edits.\
15-
You will also see any lint errors in the console.
29+
### Welcome page with Connect button
1630

17-
### `npm test`
31+
![1_welcome](./public/img/1_welcome.png)
1832

19-
Launches the test runner in the interactive watch mode.\
20-
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
33+
### Connect page
2134

22-
### `npm run build`
35+
Enter your pairing phrase and a new password to use so you don't need to login again
2336

24-
Builds the app for production to the `build` folder.\
25-
It correctly bundles React in production mode and optimizes the build for the best performance.
37+
![2_connect](./public/img/2_connect.png)
2638

27-
The build is minified and the filenames include the hashes.\
28-
Your app is ready to be deployed!
39+
### Welcome page when connected
2940

30-
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
41+
After connecting to your node, you'll be redirected back to the welcome page, but now it
42+
will display some information obtained from calling `GetInfo` on `lnd`.
3143

32-
### `npm run eject`
44+
![3_connected](./public/img/3_connected.png)
3345

34-
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
46+
### Login page
3547

36-
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
48+
If you reload the page or click the Logout link, you will be taken back to the Welcome
49+
page. It will detect that you have already connected from this browser in the past and
50+
display a "Login" button instead of "Connect". When you click "Login", you'll be take to
51+
the Login page where you only need to provide your password to reconnect to your node.
3752

38-
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
39-
40-
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
41-
42-
## Learn More
43-
44-
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
45-
46-
To learn React, check out the [React documentation](https://reactjs.org/).
53+
![4_login](./public/img/4_login.png)
248 KB
Loading
290 KB
Loading
329 KB
Loading
146 KB
Loading

0 commit comments

Comments
 (0)