Skip to content

Commit

Permalink
Update README to reflect latest changes
Browse files Browse the repository at this point in the history
  • Loading branch information
taesup committed Mar 19, 2019
1 parent 9609912 commit 8bf5fda
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,15 @@ Use `ng serve` to start the react server

`docker-compose up` to start the backend server along with postgres and redis.

`
```
"nodemonConfig": {
"watch": ["server"]
},
`
The above configurations tells the react proxy server to redirect all api calls to the backend docker instance. The `nodemonConfig` tells nodemon to only watch the server dir.
```
The `nodemonConfig` tells nodemon to only watch the server dir.

The `proxy.conf.json` file setups the proxy for the ng server to redirect all traffic on `/api` to go to the backend docker instance instead.

The way the knexfile is setup, the development section allow the user to run the knex migration from the host computer and is routed to the docker instance using localhost. The production section is used by docker to setup the postgres DB and it's connections to the rest of the docker containers.
The way the knexfile is setup, there is a single configuration shared by both development and production.

This is controlled using the `ENVIRONMENT` property within the docker-compose.override.yml file, under the environment section.

`knex migrate:latest` will run any migrations made, but this needs to be run in the server dir as that is where the knexfile.js is.

The `npm run dev` script within the package.json file sets up the how docker is going to run the express server using nodemon.
Migrations and Seeds are now run automatically on launching the express docker container via the deploy-*.js files. It also launches the server with node in production mode or launches nodemon watching all files in development mode.

0 comments on commit 8bf5fda

Please sign in to comment.