/icostats

Track performance of ICOs

Primary LanguageJavaScript

ICO Stats

How to Contribute

How to Add a Token

Running the app

Terminal #1:

docker-compose up -d
make serve

Terminal #2:

make webpack

Why make instead of npm?

These commands indeed do run npm commmands, but it runs it inside the docker container. This saves you the extra work of having to type out the docker commands every time.

Workers

Once the app starts up, some workers will also start running that import required data such as token prices. These run on an interval, and need to have run at least once in order for the app to run properly. If you see errors when you first launch the app, and the app has been running less than 5 minutes, try waiting a bit and refresh then see if it goes away.

Explore the API

Once the app is running you can view/query the graphql API explorer at: http://localhost:3000/graphiql

GraphQL

Debugging

Chrome canary now ships with a node debugger button as shown below:

debugger

Click on that, and make sure you have localhost:9229 as a source. A console for the app should show up when it starts.

Helpers

# Create a production build
npm run build   

# Log into the container shell
make shell

# Run node console inside docker
make console

Run tests

make test

Notes

  • In client code, import '~/foo' refers to src/client/foo. In server code, the same code refers to src/server/foo. In other words, '~' is an alias for the respective code's "home" directory.

  • We follow the airbnb style guide (with some changes) for javascript and the airbnb react style guide for React.