Skip to content

Latest commit

 

History

History
52 lines (31 loc) · 1.21 KB

File metadata and controls

52 lines (31 loc) · 1.21 KB

go

HTTP RACOONS

Just like HTTP Cats, but not so good and with racoons instead of cats.

This is my first Go project and I'm using it to try Go and see what I can do with it.

The language itself is not bad, is actually pretty interesting. The thing that bothers me the most is the habit of using a single letter for variable names.

I know that this code is not well written, but I'm happy for the results.

Maybe it will become http frogs or something else if I don't find enough images :/

Running the project locally:

  • Clone the repo:
git clone https://github.com/devlulcas/http-racoons.git
  • Build it:
cd http-racoons

go build cmd/http-racoons/main.go

Routes:

  • /{http-code}

Returns a JSON with the code and the url for the image for that code

{
  "code": 200,
  "image": "/images/200"
}
  • /images/{http-code}

Returns a image with racoon for your code

/images/403

forbidden