A blockchain data indexing tool for CodeChain
The software dependencies required to install and run CodeChain-indexer are:
Download CodeChain-indexer code from the GitHub repository
git clone [email protected]:kodebox-io/codechain-indexer.git
cd codechain-indexer
Use yarn package manager to install packages
yarn install
- Get CodeChain ready with the CodeChain RPC server
- Get PostgreSQL database ready for indexing block data
# download postgresql with Homebrew
brew install postgresql
brew services start postgresql
# Create the user and db with supporting sql script
psql postgres -f create_user_and_db.sql
# Create the schema of the database
yarn run migrate
Run codechain-indexer to create indices on ElasticSearch
yarn run start
# You can change the host of CodeChain and DB host on the config/dev.json
# Create the test database
NODE_ENV=test yarn run migrate
# Start testing
yarn run test
NODE_ENV=dev yarn run start
# Swagger UI is running at "http://host:port/api-docs/"
yarn run reset