+
Skip to content

sorokya/reaction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 Reaction – A Simple Emoji Reaction API

Rust

A lightweight and fast emoji reaction API built with Rust and powered by Warp.

Designed to integrate seamlessly with the serene theme for Zola.


🛠️ How to Build

Prerequisites

Build Instructions

cargo build --release

This will compile the project in release mode for better performance.


🚀 How to Run

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.

Run the API

  • Using Cargo (if built locally):
cargo run --release
  • Using Prebuilt Binary: Download the latest release for your system and run:
./reaction

🐳 Running with Docker

A prebuilt Docker image is available at: 📦 ghcr.io/sorokya/reaction

Run with Docker

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

📜 API Endpoints

Method Endpoint Description
GET / Fetch reactions for a given slug
POST / Add a reaction to a slug

📄 License

This project is licensed under the MIT License. See LICENSE for details.

About

A Simple Emoji Reaction API

Resources

License

Stars

Watchers

Forks

Packages

 
 
 
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载