From 6a079750620d40791644c9d2334cb2a1e78a4e34 Mon Sep 17 00:00:00 2001 From: Juan Sebastian Montoya Date: Thu, 26 Sep 2024 20:07:47 -0500 Subject: [PATCH] Update readme with example usages --- README.md | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 116d260..0acc08c 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,26 @@ A self-hosted avatars API using some of the [DiceBear](https://www.dicebear.com/) CC0 styles -# Installation +You can take a look at my own self-hosted version here: https://avatars.jusemon.com -## Development +The following endpoints are available: + +- https://avatars.jusemon.com/list +- https://avatars.jusemon.com/random +- https://avatars.jusemon.com/:seed + +The size of the image and the style can be changed with the following query params: + +- `size`: any number between `16` and `512` +- `style`: see the list endpoint, the valid values are defined by the property `key` + +## Example: + +https://avatars.jusemon.com/jusemon?size=512&style=open-peeps where jusemon is the :seed + +## Installation + +### Development For run locally it needs a `.env` file with the environment variables defined in the `.env.example` @@ -13,7 +30,7 @@ ALLOWED_ORIGINS includes a comma separated list for the allowed CORS sites. Install dependencies `npm install` or `yarn` To start the project run `npm run dev` or `yarn dev` -## Production +### Production For run it in docker just run `docker compose up` @@ -27,7 +44,7 @@ For run it in docker just run `docker compose up` - Created by Juan Sebastián Montoya -## Credits for Styles: +### Credits for Styles: | Title | Creator | Source | Homepage | License | | ---------- | ------------- | -------------------------------------------------------- | -------------------------------- | ------- |