Add instructions for running the app without docker
This commit is contained in:
@ -1,10 +1,40 @@
|
||||
# Sample web application
|
||||
|
||||

|
||||

|
||||
|
||||
## Minimal 3 tier web application
|
||||
- React frontend
|
||||
- Node JS and Golang APIs
|
||||
- Postgres Database
|
||||
|
||||

|
||||

|
||||
|
||||
## Running the Application
|
||||
|
||||
While the whole point of this course is that you probably won't want/need to run the application locally (See: `11-development-workflow`), we can do so as a starting point.
|
||||
|
||||
The `Makefile` contains the commands to start each application.
|
||||
|
||||
### Postgres
|
||||
|
||||
It's way more convenient to run postgres in a container as we saw in `04-using-3rd-party-containers`, so we will do that.
|
||||
|
||||
`make run-postgres` will start postgres in a container and publish port 5432 from the container to your localhost.
|
||||
|
||||
### api-node
|
||||
|
||||
To run the node api you will need to run `npm install` to install the dependencies (I used node `v19.4.0` and npm `v9.2.0`).
|
||||
|
||||
After installing the dependencies, `make run-api-node` will run the api in development mode with nodemon for restarting the app when you make source code changes.
|
||||
|
||||
### api-golang
|
||||
|
||||
To run the golang api you will need to run `go mod download` to download and install the dependencies (I used `go1.19.1`)
|
||||
|
||||
After installing the dependencies, `make run-api-golang` will build and run the api.
|
||||
|
||||
### client-react
|
||||
|
||||
Like `api-node`, you will first need to install the dependencies with `npm install` (again, I used node `v19.4.0` and npm `v9.2.0`)
|
||||
|
||||
After installing the dependencies, `make run-client-react` will use vite to run the react app in development mode.
|
||||
Reference in New Issue
Block a user