NuExplorer is powered by MongoDB, Expressjs, Angularjs and Nodejs. Query for blocks, transactions, and addresses found in the Nu network (https://nubits.com).
--replSet <name>
; Note: --auth
and bind_ip=127.0.0.1
are recommended configurationscd ./NuExplorerOS-master
sudo npm install
.mongo-oplog-watcher
folder into node_modules
server.js
, and /public/app/api/api.tools.js
,specifically exports.db
mongod --replSet rs0
to spin up the daemon.
--replSet rs0
mongo shell
connectionmongo
in a new window pane
mongod --replSet rs0
.rs.initiate()
rs0:PRIMARY>
. If it doesn't,type use admin
, then db.shutdownServer()
and repeat step 1.use BlockDB
BlockDB
to store our data
db.createCollection('<CollectionName>')
<CollectionName>
with the following namesBlockCollection
ChartCollection
ChartCollection
paste the following commands in the mongo shelldb.ChartCollection.insert({ "_id":"orphan", "orph":[] })
db.ChartCollection.insert({ "_id":"diff", "pos":[] })
db.ChartCollection.insert({ "_id":"numtrans", "Bits":[], "Shares":[]})
InputTxCollection
MotionCollection
OrphanBlockCollection
OrphanTxCollection
PeerCollection
SharesAddressCollection
StatusCollection
StatusCollection
paste the following commands in the mongo shell db.StatusCollection.insert({_id:"statusInfo"})
,db.StatusCollection.insert({_id:"addressLeftOff","blockHeight":0})
TxCollection
VoteCollection
show collections
in mongo shell.Now, depending on what OS your running, we have to create a nu.conf
file.
if your on Windows, head to the folder C:/users/<username>/appdata/roaming/nu/
if your on Linux, head to the folder /root/.nu/
(the same might apply to Mac OSX)
create a file called nu.conf
in the folder. (windows users can use notepad)
now, open nu.conf
and copy and paste the following into the file.
server=1
rpcport=14001
rpcuser=user
rpcpassword=pass
addnode=198.52.160.71
addnode=198.52.217.4
addnode=198.52.199.75
addnode=198.52.199.46
addnode=162.242.208.43
addnode=192.237.200.146
addnode=119.9.75.189
addnode=119.9.12.63
listen=1
NuParserv007.py
in your choice of IDE
pip install git+https://github.com/jgarzik/python-bitcoinrpc.git
line 14
according to your mongodb setupline 30
according to your nu.conf rpcuser
,rpcpassword
,rpcport
propertiesblk01
,blk02
and according to where your nu.conf
file is located, comment/uncomment
the correct location
i.e) for Windows use: blk01 = "C:/users/<username>/appdata/roaming/nu/blk0001.dat",blk02=...,blk=""
fi.seek()
(line 416) and START
,END
(lines 486,487) respectively to insert the desired blocks.nu.conf
file and add this property
at the bottom:
blocknotify=C:\<python-location>\python.exe C:\<folder-location>\NuExplorerOS\pythonparser\NuParserv007.py
blocknotify=/usr/bin/python /<folder-location>/NuExplorerOS/pythonparser/NuParserv007.py
node server.js
localhost:800
DONE! Your setup and installation is complete. If your stuck, feel free to contact me at jgeorges371@gmail.com or write a github issue.
The MIT License (MIT)
Copyright (c) 2016 Johny Georges
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.