https://github.com/exu/homework-ports
Ports with GRPC and HTTP
https://github.com/exu/homework-ports
Last synced: over 1 year ago
JSON representation
Ports with GRPC and HTTP
- Host: GitHub
- URL: https://github.com/exu/homework-ports
- Owner: exu
- Created: 2021-05-24T07:43:57.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-05-24T07:44:12.000Z (about 5 years ago)
- Last Synced: 2025-01-31T21:07:24.597Z (over 1 year ago)
- Language: Go
- Size: 27.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Solution
Entrypoints resides in cmd/{data,domain} dirs. Each of them are entrypoints for both domain and data services
# What's missing (no more time :( )
- Tests a lot o them.
- Some structs should be initialized, configured in better way (e.g. not only single ones are conifiugred with envs etc.)
- No logs, metrics, repeating
- Not implemented requirements from task - e.g. graceful shutdown of GRPC server
- No docker-compose used
# Running
to run please disable local mongo or disable local mongo (no time for docker-compose)
and be sure to have ports 9090 and 9091 free (works on linux with network=host)
```sh
cp ${YOUR_PATH_TO_PORTS_JSON_FILE}/ports.json ./
make build # builds docker files
make run # runs everythuing on your local machine as detached docker containers be sure to have free ports
# when everything start
curl -X POST http://localhost:9090/ports
```