A lightweight and fast emoji reaction API built with Rust and powered by Warp.
Designed to integrate seamlessly with the serene theme for Zola.
- Install rust
cargo build --release
This will compile the project in release mode for better performance.
Reaction API can be configured using the following environment variables:
Variable | Description | Default Value |
---|---|---|
REACTION_DB |
Path to the SQLite database | ./reactions.db |
REACTION_HOST |
Host the API should listen on | 0.0.0.0 |
REACTION_PORT |
Port the API should listen on | 8080 |
REACTION_EMOJIS |
Emojis to pick from | 👍❤️🔥👏🤩😂😢🤔😡🤯🧠🎉⚡💤🤝 |
The API will automatically create a SQLite database if one doesn't exist.
- Using Cargo (if built locally):
cargo run --release
- Using Prebuilt Binary: Download the latest release for your system and run:
./reaction
A prebuilt Docker image is available at:
📦 ghcr.io/sorokya/reaction
docker run -p 8080:8080 -v $(pwd)/reactions.db:/reaction/reactions.db ghcr.io/sorokya/reaction:master
This will:
- Expose the API on port 8080
- Mount your reactions.db file for persistent storage
Method | Endpoint | Description |
---|---|---|
GET |
/ | Fetch reactions for a given slug |
POST |
/ | Add a reaction to a slug |
This project is licensed under the MIT License. See LICENSE for details.