Updating README with run instructions

This commit is contained in:
Brandon Watson
2023-08-15 14:45:58 -05:00
committed by watsonb8
parent 9dc9e6b031
commit abce265ba5
2 changed files with 364 additions and 3 deletions

View File

@ -27,7 +27,7 @@ The front service should not have any state of its own and should call the appro
The microservices should be written in Go using the Goa framework and provided as a GitHub repository.
## Items
### Items
Items should have the following attributes:
@ -41,7 +41,7 @@ Items should have the following attributes:
- An amount of protection they can provide
## Characters
### Characters
Characters should have the following attributes:
@ -50,6 +50,37 @@ Characters should have the following attributes:
- An amount of health
- An amount of experience
## Inventories
### Inventories
Inventories should associate a set of items with a character.
## Running the project
### Install Dependencies
1. [Tmux](https://github.com/tmux/tmux/wiki/Installing) is a terminal multiplexer which is used for running multiple services at once. TL;DR `brew install tmux`
2. [Overmind](https://github.com/DarthSim/overmind) is a process manager for Procfile-based applications and tmux. TL;DR `brew install overmind`
3. Install Goa with `go install goa.design/goa/v3/cmd/goa@v3`
4. Install the protoc protobuf compiler with `brew install protobuf`
5. Install protoc plugin for go
```text
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
```
6. Run `./gen` to generate boilerplate code for the project
7. Build the project with `./build`
> Note you may need to make `gen`, `build` and `server` scripts executable with `chmod u+x gen build server`
### Run
Finally, run the project with `./server`. A postman collection has been included with this project for easy testing
## Future Improvements
- Add docker files for each service for easy deployment
- Unit test suites for each service
- Integration test suite for testing interactions between all services (I like to use [Testcontainers](https://testcontainers.com) for these types of tests)
- Implement pagination for all list endpoints
- Implement additional type validation
- Move front orchestrator logic separate files that encapsulate business rules