A blazing fast API for Minecraft faces

jomo b7c6f7dae1 bump version to 2.1.0 5 ani în urmă
images 47a978df6c add image dir to git 10 ani în urmă
lib b3a9793b87 add note about rate limit 5 ani în urmă
test 168457dfd9 update to node 12 5 ani în urmă
.buildpacks 2873157e97 Add 3d render support 10 ani în urmă
.editorconfig 16fdf8d1ac add editorconfig for .gitignore 10 ani în urmă
.gitignore 305ed1c65f update sponsor info 8 ani în urmă
.travis.yml 1816b18b12 update deps 7 ani în urmă
CONTRIBUTING.md 8750b863a8 contributing: add tests for fixed issues 10 ani în urmă
Dockerfile cdc8c99a22 add Dockerfile, update README 5 ani în urmă
LICENSE 2934b22da2 Crafatar Team 9 ani în urmă
Procfile 5f0a3dcb63 use postinstall script instead of Procfile 10 ani în urmă
README.md cdc8c99a22 add Dockerfile, update README 5 ani în urmă
app.json fe12901f41 update app.json 10 ani în urmă
config.example.js 305ed1c65f update sponsor info 8 ani în urmă
package-lock.json 168457dfd9 update to node 12 5 ani în urmă
package.json b7c6f7dae1 bump version to 2.1.0 5 ani în urmă
www.js 85e7b4b571 remove clusters 10 ani în urmă

README.md

Crafatar travis Coverage Status Code Climate

dependency status devDependency status docs status

logo Crafatar serves Minecraft avatars based on the skin for use in external applications. Inspired by Gravatar (hence the name) and Minotar.

Image manipulation is done by lwip. 3D renders are created with node-canvas / cairo.

Contributions welcome!

There are usually a few open issues.
We welcome any opinions or advice in discussions as well as pull requests.
Issues tagged with help wanted show where we could especially need your help!

Examples

jomo's avatar Jake_0's avatar Notch's avatar sk89q's avatar
jomo's 3d head Jake_0's 3d head Notch's 3d head sk89q's 3d head
jomo's 3d body Jake_0's 3d body Notch's 3d body sk89q's 3d body
jomo's skin Jake_0's skin Notch's skin sk89q's skin

Usage / Documentation

Please visit the website for details.

Contact

Installation

Manual

  • Install nodejs 12 (LTS)
  • Install redis-server
  • Run npm install
    If that fails, it's likely because because of node-canvas dependencies. Follow this guide to install them.
  • Run npm start

Crafatar is now available at http://0.0.0.0:3000.

Docker

Download the docker image from releases (docker hub coming soon™️).

docker load -i crafatar-docker.tar
mkdir /path/to/crafatar-images
docker network create crafatar
docker run --net crafatar -d --name redis redis
docker run --net crafatar -v /path/to/crafatar-images:/crafatar/images -e REDIS_URL=redis://redis -p 3000:3000 crafatar:2.1.0

Environment variables

| Variable | Default | Description | | :- | :- | :- | | BIND | 0.0.0.0 | Hostname to listen on | | PORT | 3000 | Port to listen on | | DEBUG | false | Enable verbose debug logging | | REDIS_URL | redis://127.0.0.1:6379 | URI of the redis server | | EPHEMERAL_STORAGE | | If set, redis is flushed on start* |

* Use this to avoid issues when you have a persistent redis database but an ephemeral storage

Tests

npm test

If you want to debug failing tests:

# show logs during tests
env VERBOSE_TEST=true npm test

It can be helpful to monitor redis commands to debug caching errors:

redis-cli monitor