https://github.com/bliuchak/heroes
Building http server with CRUD functionality using http package from stdlib
https://github.com/bliuchak/heroes
crud-functionality docker golang http rest-api sandbox
Last synced: 25 days ago
JSON representation
Building http server with CRUD functionality using http package from stdlib
- Host: GitHub
- URL: https://github.com/bliuchak/heroes
- Owner: bliuchak
- License: mit
- Created: 2018-06-11T21:03:43.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-12-22T15:33:42.000Z (about 7 years ago)
- Last Synced: 2024-06-20T09:40:24.182Z (over 1 year ago)
- Topics: crud-functionality, docker, golang, http, rest-api, sandbox
- Language: Go
- Homepage:
- Size: 44.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Heroes
[](https://codeclimate.com/github/bliuchak/heroes/maintainability)
[](https://circleci.com/gh/bliuchak/heroes)
Http server which provides basic CRUD functionality about superheroes (ID and Name).
I'm using here http package from stdlib, gorillamux and Redis for storage.
What's possible:
- Get single hero
- Get all heroes
- Create new hero
- Delete hero
## Motivation
Learn how to build good and practical http servers using goland and std http package.
I'd like to do at least one small change in this repo each day to impove it.
If YOU would like to join me please do! Let's learn this together :)
## How to run
You may use plain docker:
```bash
docker build -t heroes:0.0.1 .
docker run -d -p 6379:6379 --name heroredis --network=local redis:latest
docker run -e APP_PORT=3001 -e DB_HOST=heroredis -e DB_PORT=6379 --network=local heroes:0.0.1
```
Or docker-compose:
```bash
docker-compose build
docker-compose up
```
## License
MIT