Skip to content

Discusss/familia

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LA CABRA Image

This is a simple API to deliver random images various animals.

Implemented animals

This API currently supports the following animals:

  • Goats goats
  • Otters otters (Thanks to users @.griselda. @mhroom._ @.kofu)
  • Pandas pandas (Thanks to @mhroom._)
  • Cats cats (Thanks to thecatapi.com)
  • Dogs dogs (Thanks to dog.ceo)
  • Foxes foxes (Thanks to randomfox.ca)
  • Big Cats big_cats (Thanks to @.griselda.)
  • Ducks ducks (Thanks to random-d.uk)
  • Seals seals (Thanks to @336kasza)

Routes

/find/:animal

  • Method: GET
  • Description: Returns a random image of the specified animal.
{
  "message": "OK",
  "url": "<url to the image>"
}

/assets/:animal/:filename

  • Method: GET
  • Description: Returns a static image of the specified animal.

Self-hosting

With Docker

You can download the image from the GitHub Container Registry and run it with Docker.

docker pull ghcr.io/discusss/lacabra-img:latest

You will need to set the following environment variables, either in a .env file or in the command line:

  • PORT: The port on which the server will run. Default is 3000.
  • HOST: The host on which the server will run. Default is 0.0.0.0
  • ENABLE_METRICS (Optional): If set to true, the server will expose a /metrics endpoint with Prometheus metrics. Default is false.
  • METRICS_PASSWD (Optional): The password to access the /metrics endpoint. Default is lacabra.
  • DOMAIN: The domain of the server. Default is localhost:3000.
  • USE_HTTPS: If set to true, the server will use HTTPS. Default is false.

Releases

No releases published

Packages

No packages published