- node.js v10.5+
- mongodb v4.0+
git clone --recursive https://github.com/xuanyan0x7c7/qtum.git
- Follow the instructions https://github.com/qtumproject/qtum#building-qtum-core to build qtum
- Run
qtumd
with-logevents=1
enabled
git clone https://github.com/qtumproject/qtuminfo.git && cd qtuminfo
npm install
mkdir packages/explorer
(you may change the directory name) and write filespackage.json
andqtuminfo-node.json
to it// package.json { "name": "explorer-mainnet", "private": true, "scripts": { "start": "qtuminfo-node start" }, "dependencies": { "qtuminfo-api": "^0.0.1", "qtuminfo-node": "^0.0.1", "qtuminfo-ws": "^0.0.1" } }
// qtuminfo-node.json { "chain": "mainnet", "port": 3001, "datadir": "/absolute/path/to/qtuminfo/packages/explorer/data", "services": [ "qtuminfo-api", "qtuminfo-ws", "address", "balance", "block", "contract", "db", "header", "mempool", "p2p", "transaction", "web" ], "servicesConfig": { "db": { "mongodb": { "url": "mongodb://localhost:27017/", "database": "qtuminfo-mainnet" }, "rpc": { "protocol": "http", "host": "localhost", "port": 3889, "user": "user", "password": "password" } }, "p2p": { "peers": [ { "ip": { "v4": "127.0.0.1" }, "port": 3888 } ] }, "qtuminfo-ws": { "port": 3002 } } }
npm run lerna bootstrap
- run
npm start
inpackages/explorer
directory
git clone https://github.com/qtumproject/qtuminfo.git && cd qtuminfo
npm install
You may modifypackage.json
as follows:- rewrite
script.build
to"build": "QTUMINFO_API_BASE_CLIENT=/api/ QTUMINFO_API_BASE_SERVER=http://localhost:3001/qtuminfo-api/ QTUMINFO_API_BASE_WS=//example.com/ws/ nuxt build"
inpackage.json
to set the api URL base - rewrite
script.start
to"start": "PORT=12345 nuxt start"
to frontend on port 12345
- rewrite
npm run build
npm start