# React Tutorial 2
A grass Hello World! Call grass from your react app, and write output to page.

## Getting Started
```bash
docker-compose build
npm install
node_modules/browserify/bin/cmd.js -t [ babelify --presets [ react ] ] main.js -o > src/bundle.js
docker-compose up
```

### Notes
* You only need to build the Docker one time, it will always mount the volume
  and allow you to perform live edits.
* To get the IP of your Docker: `echo $DOCKER_HOST`.

### Questions

- Why do I need Docker? You need to run Docker because it allows you to have
  access to QA Grass proxy. The Docker sets up an nginx proxy on `/api/`.
  Thus, your javascript application can call this url instead of calling a
  remote server, and introducing CORS issues.

- How do I test if Grass is accessible? Just go to `/api/hello/`. If it does
  not work, it's likely you're not on the VPN.
  