Run Dev Mode
Dev mode is for development purposes to allow easier debugging and testing. If you have built your exchange using CLI commands running on your machine, you need to stop and start the process fresh with the following instructions.
Clone the hollaex-kit github repo: https://github.com/bitholla/hollaex-kit
  • HollaEx Kit web is the front-end project built in reactjs that connects to the HollaEx Kit server which is accessible in the server folder.

Web

/web folder in HollaEx Kit is a ReactJS project that contains all the front-end code. To run it locally in development mode, you need to run: npm start which installs all the dependencies and start the browser on http://localhost:3000 . Changes are applied and updated live to the site.
By default it connects to the default HollaEx Kit which is HollaEx Sandbox https://api.sandbox.hollaex.com
You can change this value in /web/src/config/index.js
Change DEVELOPMENT_ENDPOINT to your custom HollaEx Kit server API.

Server

In order to start the server in dev mode you need to run the following:
  1. 1.
    cd server/
  2. 2.
    make an env mv tools/hollaex-kit.env.local.example tools/hollaex-kit.env.local
  3. 3.
    Run docker-compose up
  4. 4.
    Once docker is all set check docker ps and there should be 4 containers for nginx redis postgresql and the kit server
  5. 5.
    Go inside docker container docker exec -it server_hollaex-kit-server_1 /bin/bash
  6. 6.
    Once you are successfully inside the docker container you should run the following commands:
    • Run database migrations: sequelize db:migrate
    • Set the exchange keys based on HollaEx Network exchange keys. It can be found on dash.hollaex.com (Production HollaEx Network) or dash.testnet.hollaex.com (Testnet HollaEx Network). This key is very important to connect the HollaEx Kit to HollaEx Network
      • (the following is example of an exchange called hiww on HollaEx Network Testnet) export API_KEY=<your key> API_SECRET=<your secret> ACTIVATION_CODE=<your activation code>
    • Run database seed: sequelize db:seed:all
    • Run database triggers: node tools/dbs/runTriggers.js
    • Run activation to activate the exchange: node tools/dbs/setActivationCode.js
By default the env uses NETWORK=testnet which would connect your HollaEx Kit to the Testnet HollaEx Network. If you want to change that you can set NETWORK_URL to your custom HollaEx Network endpoint.

Plugin

Plugin is part of the server in /server/plugins folder. In order to setup a development environment for developing a plugin you need to follow the following:
  1. 1.
    Go to the plugins folder cd /plugins
  2. 2.
    Go inside the server's docker container docker exec -it server_hollaex-kit-server_1 /bin/bash
  3. 3.
    Inside the container run node plugins/dev.js
  4. 4.
    The plugin is accessible on http://localhost:10012/
  5. 5.
    Follow the guide for plugin development on https://docs.hollaex.com/how-tos/develop-plugins
You can find the hollaex plugin starter library which has a template with some useful tools here: https://github.com/bitholla/hollaex-plugin-starter
Copy link