5
5
Explore transactions, blocks, and valuable data for the Libre Blockchain.
6
6
7
7
## Getting Started
8
+
8
9
First, run the development server if necessary to test. This is not suitable for production:
9
10
10
11
``` bash
@@ -16,39 +17,52 @@ yarn dev
16
17
Open [ http://localhost:3000 ] ( http://localhost:3000 ) with your browser to see the result.
17
18
18
19
## Running a Production Instance with PM2
20
+
19
21
Running a Yarn built version of the Libre Blocks Explorer under PM2 is performant and production ready alternative to using docker.
20
22
21
23
Please follow the process below:
22
24
23
25
### Install Node.js
24
- ``` $ curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - &&sudo apt-get install -y nodejs ```
26
+
27
+ ` $ curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - &&sudo apt-get install -y nodejs `
25
28
26
29
### Install PM2
27
- ``` $ sudo npm install pm2 -g ```
30
+
31
+ ` $ sudo npm install pm2 -g `
28
32
29
33
### Install Yarn
30
- ``` $ sudo npm install --global yarn ```
34
+
35
+ ` $ sudo npm install --global yarn `
31
36
32
37
### Configure for your environment
33
- ```
38
+
39
+ ```
34
40
$ nano ~/Libre-Blocks-Explorer/.env
35
41
36
- NEXT_PUBLIC_DASHBOARD_API=https://dashboard-api.libre.org
37
- NEXT_PUBLIC_LIBRE_API=https://lb.libre.org/v2/history
38
- NEXT_PUBLIC_HYPERION_API=https://lb.libre.org/v2
39
- NEXT_PUBLIC_LIBRE_DASHBOARD_API=https://dashboard-api.libre.org
40
- NEXT_PUBLIC_BLOCK_API=https://lb.libre.org/v1
42
+ NEXT_PUBLIC_LIBRE_API=https://dashboard-api.libre.org
43
+ NEXT_PUBLIC_HISTORY_API=https://lb.libre.org
41
44
```
45
+
42
46
### Build and Run Libre Blocks Explorer
47
+
43
48
```
44
49
$ cd ~/Libre-Blocks-Explorer
45
50
51
+ $ yarn
52
+
46
53
$ yarn build
47
54
48
55
$ pm2 start yarn --name "libreblocks" -- next start
49
56
```
57
+
58
+ ### To Run Libre Blocks Explorer on a Specific Port
59
+
60
+ ` $ pm2 start yarn --name "libreblocks" -- next start -p 3001 `
61
+
50
62
### PM2 Logs
51
- ``` $ pm2 logs ```
63
+
64
+ ` $ pm2 logs `
52
65
53
66
## Feedback
67
+
54
68
If you have any feedback, please contact us at
[email protected] or the telegram
https://t.me/libreblocks
0 commit comments