Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ See deployed at http://ivanc.uk
2. A [Django server app](/server) that assists the React app by providing data via a REST API.
See deployed at https://api.ivanc.uk

## React app
## Getting started with React app

Source code located under `/web-client`. This React app is set up with [Webpack](https://webpack.github.io/) and
[Express](http://expressjs.com/) so that the React components are rendered in the server side.
Expand All @@ -19,15 +19,15 @@ Source code located under `/web-client`. This React app is set up with [Webpack]
5. Modify any of the components under [`/src`](web-client/src) and see the changes in real time thanks to
[React Hot loader](https://github.com/gaearon/react-hot-loader)

#### Deployment
#### Deployment of React app
This app can be deployed as a Node application on Heroku or Dokku.
There is a `heroku-postbuild` script in [`package.json`](web-client/package.json) so every time the app is pushed to Heroku,
Webpack compiles the JavaScript code in production mode. Webpack outputs the result into `public/bundle.js` that is loaded
from [`index.html`](web-client/index.html). This `index.html` file is then served with Express when the root endpoint is
requested. See [`server.js`](web-client/server.js) for more details.

There are a couple of **environment variables** that need setting up before deploying:
* `API_BASE_URL`: The URL where the Django server app is deployed. e.g. https://api.ivanc.uk/
* `API_BASE_URL`: The URL where the Django server app is deployed. for e.g. https://api.ivanc.uk/
* `GA_TRACKING_CODE`: Your Google Analytics tracking code.


Expand Down