Skip to content

Commit 0cabb62

Browse files
committed
Update README.md
updated to document new .env format, and added instructions for changing the default port
1 parent eb01944 commit 0cabb62

File tree

1 file changed

+24
-10
lines changed

1 file changed

+24
-10
lines changed

README.md

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
Explore transactions, blocks, and valuable data for the Libre Blockchain.
66

77
## Getting Started
8+
89
First, run the development server if necessary to test. This is not suitable for production:
910

1011
```bash
@@ -16,39 +17,52 @@ yarn dev
1617
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
1718

1819
## Running a Production Instance with PM2
20+
1921
Running a Yarn built version of the Libre Blocks Explorer under PM2 is performant and production ready alternative to using docker.
2022

2123
Please follow the process below:
2224

2325
### 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`
2528

2629
### Install PM2
27-
```$ sudo npm install pm2 -g```
30+
31+
`$ sudo npm install pm2 -g`
2832

2933
### Install Yarn
30-
```$ sudo npm install --global yarn```
34+
35+
`$ sudo npm install --global yarn`
3136

3237
### Configure for your environment
33-
```
38+
39+
```
3440
$ nano ~/Libre-Blocks-Explorer/.env
3541
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
4144
```
45+
4246
### Build and Run Libre Blocks Explorer
47+
4348
```
4449
$ cd ~/Libre-Blocks-Explorer
4550
51+
$ yarn
52+
4653
$ yarn build
4754
4855
$ pm2 start yarn --name "libreblocks" -- next start
4956
```
57+
58+
### To Run Libre Blocks Explorer on a Specific Port
59+
60+
`$ pm2 start yarn --name "libreblocks" -- next start -p 3001`
61+
5062
### PM2 Logs
51-
```$ pm2 logs```
63+
64+
`$ pm2 logs`
5265

5366
## Feedback
67+
5468
If you have any feedback, please contact us at [email protected] or the telegram https://t.me/libreblocks

0 commit comments

Comments
 (0)