docker-compose up -d
make serve
Why
make serve
instead ofnpm start
?
Two reasons: 1) it does run npm start
but logs into the container first, and 2) attaches to npm's tty so you can type rs
to restart the server.
npm run dev
# This runs once a day in the production server with crontab. Locally it must
be run manually
make shell
# Once inside the container:
node bin/importGraphData.js
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.