docker-compose up -d
make serve
make webpack
Why
make
instead ofnpm
?
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.
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.
Once the app is running you can view/query the graphql API explorer at: http://localhost:3000/graphiql
Chrome canary now ships with a node debugger button as shown below:
Click on that, and make sure you have localhost:9229 as a source. A console for the app should show up when it starts.
# 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
-
In client code,
import '~/foo'
refers tosrc/client/foo
. In server code, the same code refers tosrc/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.