🚀 MC-MOTD-API
A real-time Minecraft server MOTD query and display service based on Node.js. Built with a separated front-end (Vite + Vue3) and back-end (Express + JavaScript).
🎨 Preview
| External embedding | Main site |
|---|---|
![]() | ![]() |
🛠️ Environment Requirements
| Tool | Minimum Version | Recommended Version |
|---|---|---|
| Node.js | >= 24.4 | 24.4.0 |
| pnpm / npm / yarn | Any | pnpm 8+ |
| Python | 3.0 | 3.10+ |
Important Note: Although this project does not use Python directly, your local Python environment is required for compiling the
node-canvasdependency. Please ensure it is installed correctly.
🚀 Getting Started
1. Clone Repository
git clone https://github.com/mcmotd/mcmotdapi.git
cd mcmotdapi
2. Install Dependencies
Using pnpm is recommended for dependency management.
# Install backend dependencies
cd backend
pnpm install
# Go back to the root and install frontend dependencies
cd ../front
pnpm install
3. Modify Configuration
All configuration files are located in the backend/config/ directory.
- Main Backend Config:
backend/config/config - Frontend Config:
backend/config/front.json - Image Generator Config:
backend/config/pic.json
4. Run the Project
| Step | Command | Description |
|---|---|---|
| ① Build Static Files | npm run build:publish | If you encounter errors, try upgrading Node.js to the latest stable version. |
| ② Start Server | npm run start | The service will listen on http://localhost:3123 by default. |
After a successful start, open http://localhost:3123 in your browser to see the result.
📜 Optional Scripts
For convenience, you can create the following scripts in the project's root directory for a one-click start.
Linux / macOS (start.sh)
#!/usr/bin/env bash
# Grant execute permission: chmod +x start.sh
echo "Building front-end files..."
npm run build:publish
echo "Starting server..."
npm run start
wait
Windows (start.bat)
@echo off
echo "Building front-end files..."
npm run build:publish
echo "Starting server..."
npm run start
🐳 Docker Deployment
1. Pull Image
docker pull sbaoor/mc-status-app:latest
2. Run Container
This command maps port 3123 of the container to the host and mounts the configuration directory for easy modification.
docker run -d --name mc-status-container \
-p 3123:3123 \
-v mc-status-config:/app/config \
sbaoor/mc-status-app:latest
📄 License
BSD2 © mcmotd

