mirror of
https://github.com/fullstack-cash/bch-api.git
synced 2026-09-21 16:52:04 -07:00
Updating example shell script
This commit is contained in:
+2
-2
@@ -10,9 +10,9 @@ const config = {
|
|||||||
: 'secret-jwt-token',
|
: 'secret-jwt-token',
|
||||||
|
|
||||||
// Rate Limits
|
// Rate Limits
|
||||||
anonRateLimit: process.env.ANON_RATE_LIMIT ? process.env.ANON_RATE_LIMIT : 50,
|
anonRateLimit: process.env.ANON_RATE_LIMIT ? Number(process.env.ANON_RATE_LIMIT) : 50,
|
||||||
whitelistRateLimit: process.env.WHITELIST_RATE_LIMIT
|
whitelistRateLimit: process.env.WHITELIST_RATE_LIMIT
|
||||||
? process.env.WHITELIST_RATE_LIMIT
|
? Number(process.env.WHITELIST_RATE_LIMIT)
|
||||||
: 10,
|
: 10,
|
||||||
whitelistDomains: process.env.WHITELIST_DOMAINS
|
whitelistDomains: process.env.WHITELIST_DOMAINS
|
||||||
? process.env.WHITELIST_DOMAINS.split(',')
|
? process.env.WHITELIST_DOMAINS.split(',')
|
||||||
|
|||||||
+22
-10
@@ -1,15 +1,18 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Full node
|
# Which network are you using?
|
||||||
export RPC_BASEURL=http://<full node ip>:8332/
|
|
||||||
export RPC_USERNAME=<RPC username>
|
|
||||||
export RPC_PASSWORD=<RPC password>
|
|
||||||
export NETWORK=mainnet
|
export NETWORK=mainnet
|
||||||
|
#export NETWORK=testnet
|
||||||
|
|
||||||
|
# Full node
|
||||||
|
export RPC_IP=<ip>:8332
|
||||||
|
export RPC_BASEURL=http://$RPC_IP/
|
||||||
|
export RPC_USERNAME=bitcoin
|
||||||
|
export RPC_PASSWORD=password
|
||||||
|
|
||||||
# SLPDB
|
# SLPDB
|
||||||
export SLPDB_URL=http://<SLPDB IP>:12300/
|
export SLPDB_URL=http://<SLPDB IP>:12300/
|
||||||
export SLPDB_PASS=somelongpassword
|
export SLPDB_PASS=somelongpassword
|
||||||
|
|
||||||
# Use the same address as SLPDB_URL if you don't have a separate whitelist server.
|
# Use the same address as SLPDB_URL if you don't have a separate whitelist server.
|
||||||
export SLPDB_WHITELIST_URL=http://<SLPDB IP>:12300/
|
export SLPDB_WHITELIST_URL=http://<SLPDB IP>:12300/
|
||||||
|
|
||||||
@@ -17,15 +20,13 @@ export SLPDB_WHITELIST_URL=http://<SLPDB IP>:12300/
|
|||||||
# https://github.com/Permissionless-Software-Foundation/slp-api
|
# https://github.com/Permissionless-Software-Foundation/slp-api
|
||||||
export SLP_API_URL=http://10.0.0.5:5001/
|
export SLP_API_URL=http://10.0.0.5:5001/
|
||||||
|
|
||||||
# Blockbook
|
|
||||||
export BLOCKBOOK_URL=https://<Blockbook IP>:9131/
|
|
||||||
# Allow node.js to make network calls to https using self-signed certificate.
|
|
||||||
export NODE_TLS_REJECT_UNAUTHORIZED=0
|
|
||||||
|
|
||||||
# Mainnet Fulcrum / ElectrumX
|
# Mainnet Fulcrum / ElectrumX
|
||||||
export FULCRUM_URL=192.168.0.6
|
export FULCRUM_URL=192.168.0.6
|
||||||
export FULCRUM_PORT=50002
|
export FULCRUM_PORT=50002
|
||||||
|
|
||||||
|
# JWT Token Secret
|
||||||
|
# This is used to verify JWT tokens generated with jwt-bch-api:
|
||||||
|
# https://github.com/Permissionless-Software-Foundation/jwt-bch-api
|
||||||
export TOKENSECRET=somelongpassword
|
export TOKENSECRET=somelongpassword
|
||||||
|
|
||||||
# So that bch-api can call bch-js locally.
|
# So that bch-api can call bch-js locally.
|
||||||
@@ -34,4 +35,15 @@ export LOCAL_RESTURL=http://127.0.0.1:3000/v3/
|
|||||||
# Basic Authentication password
|
# Basic Authentication password
|
||||||
export PRO_PASS=somerandomepassword:someotherrandompassword:aThirdPassword
|
export PRO_PASS=somerandomepassword:someotherrandompassword:aThirdPassword
|
||||||
|
|
||||||
|
# Whitelisted domains. Automatically give pro-tier rate limit access to apps
|
||||||
|
# that originate froma domain on the whitelist.
|
||||||
|
export WHITELIST_DOMAINS=fullstack.cash,psfoundation.cash,torlist.cash
|
||||||
|
|
||||||
|
# Rate Limits. Numbers are divided into 1000. e.g. 1000 / 50 = 20 RPM for ANON.
|
||||||
|
# Requests use the ANON rate limit if they fail to pass in a JWT token.
|
||||||
|
# ANON = 20 requests per minute (RPM)
|
||||||
|
export ANON_RATE_LIMIT=50
|
||||||
|
# 10 = 100 RPM
|
||||||
|
export WHITELIST_RATE_LIMIT=10
|
||||||
|
|
||||||
npm start
|
npm start
|
||||||
|
|||||||
Reference in New Issue
Block a user