GithubHelp home page GithubHelp logo

isabella232 / kyber-tracker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kybernetwork/kyber-tracker

0.0 0.0 0.0 14.26 MB

License: MIT License

Makefile 0.06% JavaScript 63.12% Vue 29.11% Shell 0.27% Dockerfile 0.03% SCSS 6.66% Handlebars 0.75%

kyber-tracker's Introduction

KyberTracker

Setup environment and run the app

Install system dependencies

  • NodeJS v8+
  • MariaDB v10+ (may use MySQL v5.7+ instead)

Install NodeJS global packages

$ npm install -g knex pm2

Checkout and install node packages from source code

$ git clone [email protected]:sotatek-dev/KyberTracker.git
$ cd KyberTracker
$ npm install

Create environment variables settings

$ cp .env.example .env // Then update the valid setting values in the .env file

Initialize the database schema and seeds data

$ npm run init-db
$ npm run seeds

Run the app

$ npm start

Code directory structure

The .env file

  • 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

The config directory

  • 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 app/controllers directory

  • The first request's handler layer.

The app/crawlers directory

  • The process that crawls on-chain data to local database.

The app/models directory

  • The interface that interacts with MySQL database.

The app/services directory

  • The functions that will handle the main logic/business of the app

Maintenance

Add new token

  • Add data to config/network/production.js file.

Change the localization

  • Update values in json files under folder resources/lang.

kyber-tracker's People

Contributors

chubby-chocobo avatar duongpham avatar favadi avatar manhlx3006 avatar ngocvan9x avatar thith avatar toniqhz avatar vietthang207 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.