|
1 | | -# Getting Started with Create React App |
| 1 | +# LNC Demo - Basic Connect |
2 | 2 |
|
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. |
4 | 5 |
|
5 | | -## Available Scripts |
| 6 | +## Running the demo |
6 | 7 |
|
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. |
8 | 10 |
|
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 |
10 | 26 |
|
11 | | -Runs the app in the development mode.\ |
12 | | -Open [http://localhost:3000](http://localhost:3000) to view it in the browser. |
| 27 | +## Screenshots |
13 | 28 |
|
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 |
16 | 30 |
|
17 | | -### `npm test` |
| 31 | + |
18 | 32 |
|
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 |
21 | 34 |
|
22 | | -### `npm run build` |
| 35 | +Enter your pairing phrase and a new password to use so you don't need to login again |
23 | 36 |
|
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 | + |
26 | 38 |
|
27 | | -The build is minified and the filenames include the hashes.\ |
28 | | -Your app is ready to be deployed! |
| 39 | +### Welcome page when connected |
29 | 40 |
|
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`. |
31 | 43 |
|
32 | | -### `npm run eject` |
| 44 | + |
33 | 45 |
|
34 | | -**Note: this is a one-way operation. Once you `eject`, you can’t go back!** |
| 46 | +### Login page |
35 | 47 |
|
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. |
37 | 52 |
|
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 | + |
0 commit comments