Skip to content

PilulkaDistribuce/golang-workshop

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

golang-workshop

Golang workshop to demonstrate how to create REST API.

State

API endpoints:

  • Home - GET /
  • Health - homework (returns 200 in case Redis connection established othervise returns 503)
  • GetBooks - homework
  • GetBook - GET /book/{id}
  • CreateBook - POST /book
  • DeleteBook - homework

Usage

  1. Run server

    docker-compose up --build -d
  2. Create book

    curl -XPOST "http://0.0.0.0:3000/book" --data '{"id": "123", "title":"MegaBook"}' -v
  3. Get book

    curl "http://0.0.0.0:3000/book/123"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 91.2%
  • Dockerfile 7.6%
  • Shell 1.2%