heroes

module
v0.0.0-...-6dea0d5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 22, 2018 License: MIT

README

Heroes

Maintainability CircleCI

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:

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:

docker-compose build
docker-compose up

License

MIT

Directories

Path Synopsis
cmd
heroes command
db
storage/mocks
Code generated by mockery v1.0.0.
Code generated by mockery v1.0.0.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL