Skip to content

The backend API of the "Global Tags" Minecraft mod powered by Elysia and Bun.

License

Notifications You must be signed in to change notification settings

Global-Tags/API

Repository files navigation

🏷️ GlobalTag API

This repository contains the backend API of the GlobalTagDB for the Minecraft modification GlobalTags.

💪 Prerequisites

📦 Installation

# Clone the repository
$ git clone https://github.com/Global-Tags/API gtapi
$ cd gtapi

# Copy the config
$ cp config.json.example config.json # Edit the config to your liking.

# Install the accent cli and pull the translation files
$ bun i -g accent-cli
$ chmod +x sync.sh
$ ./sync.sh

🍞 Run with Bun (that rhymes)

# Install the required dependencies
$ bun i

# Try running it
$ bun dev

# Install pm2
$ npm install pm2 -g && pm2 install pm2-logrotate

# Run the API daemonized
$ pm2 start src/index.ts --interpreter ~/.bun/bin/bun --name GlobalTagAPI

🐋 Run with Docker

# Option 1: With docker compose
$ docker compose up -d

# Option 2: Without docker compose
$ docker run -p 5000:5000 $(docker build -q .)

🤝 Contributing

See CONTRIBUTING.md

🔨 Known Usages