mirror of
https://github.com/azures04/crafatar.git
synced 2026-03-22 07:51:17 +01:00
when using cache.save_hash, an `undefined` skin or cape hash means "do not touch" while `null` means "overwrite as non-existent" this was sent to redis after calling /capes/Notch for the first time: "hmset" "notch" "c" "3f688e0e699b3d9fe448b5bb50a3a288f9c589762b3dae8308842122dcb81" "t" "1429651244222" "hmset" "notch" "s" "a116e69a845e227f7ca1fdde8c357c8c821ebd4ba619382ea4a1f87d4ae94" "c" "" "t" "1429651244235" as you can see, the first request stores the c(ape) but does not touch the s(kin), whereas the second request sets the s(kin) and replaces the c(ape) value
Crafatar

[Crafatar](https://crafatar.com) serves Minecraft avatars based on the skin for use in external applications.
Inspired by [Gravatar](https://gravatar.com) (hence the name) and [Minotar](https://minotar.net).
Image manipulation is done by lwip. 3D renders are created with node-canvas, based on math by confuser.
Examples
Usage / Documentation
Please visit the website for details.
Contact
- You can follow us on
@crafatar
- Open an issue on GitHub
- You can join us in #crafatar on irc.esper.net.
Installation
Heroku
Dokku
- Install the dokku-redis plugin
dokku redis:start- You also might want to use docker-options for persistent storage:
-v /var/lib/crafatar/images:/app/images
-v /var/log/crafatar:/app/logs
- Deploy with ENV config:
PORT=5000
BIND=0.0.0.0
Local
- Use io.js
- Install Cairo.
npm install- Start
redis-server npm start- Access http://localhost:3000
Tests
npm test
If you want to debug failing tests, you can set the env
VERBOSE_TEST=true
To debug caching, it can be helpful to monitor redis commands while tests are running:
redis-cli monitor
Languages
JavaScript
79.5%
EJS
13.6%
CSS
5.3%
Shell
0.9%
Dockerfile
0.7%