- NodeJS v8+
- MariaDB v10+ (may use MySQL v5.7+ instead)
$ npm install -g knex pm2
$ git clone git@github.com:sotatek-dev/KyberTracker.git
$ cd KyberTracker
$ npm install
$ cp .env.example .env // Then update the valid setting values in the .env file
$ npm run init-db
$ npm run seeds
$ npm start
- Store the environement variables
PORT=9009 // The port that app will run in
NODE_ENV=development // JS bundle files will be minified/compressed if the environment is production.
LOG_LEVEL=INFO // Available options: ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL
MYSQL_DB_HOST=127.0.0.1 // MySQL host address
MYSQL_DBNAME=kyber_tracker // MySQL database name
MYSQL_USERNAME=root // MySQL username
MYSQL_PASSWORD=1 // MySQL user password
config/routes/api.js
: View/add/update the API routes.config/network/production
: Configuration that is related to on-chain data- Almost don't need to touch other files.
- The first request's handler layer.
- The process that crawls on-chain data to local database.
- The interface that interacts with MySQL database.
- The functions that will handle the main logic/business of the app
- Add data to
config/network/production.js
file.
- Update values in json files under folder
resources/lang
.