Introducing a decentralized, provably fair global gaming platform, built on the most advanced blockchain technology available today. Peerplays brings a new paradigm of fairness, speed, transparency, and security to the global gaming industry.
The purpose of this project is to assist in development and debugging on the Peerplays BlockChain. This server will receive blocks from the BlockChain and push them into a Mongo database where they can easily be queried or inspected. This project is not meant to be a production server, and production applications should be communicating with the BlockChain directly.
- Install dependencies:
npm install
- If you do not have mongodb installed on your local machine then follow this tutorial, otherwise ...
- Start mongodb:
mongod
- To verify that mongodb is running, visit 'localhost:27017' in your browser
- Clean your database with
npm run clean
- Populate your database with
npm run populate
This method is recommended if you wish to leave the server running and allow it to continually fetch and store blocks
- Run the start script
npm start
You may edit each one of these scripts constant values for further flexibility. For example, the getTransaction script can be modified to get any transaction object, but by default, gets the first transaction in the PeerPlays Blockchain.
- Clean databases -
npm run clean
- Create databases with default collections -
npm run create
- Populate the database with Blocks -
npm run populate
- Start listening for new blocks, and populating the database -
npm start
You may want to connect to different databases. This can be achieved by passing the environment name via the command line.
npm run listen [live|test|dev]
MIT