Files
status-check/README.md
2025-07-03 00:54:19 -04:00

110 lines
3.6 KiB
Markdown

# Minecraft Server Status Checker
A web application to check the status of Minecraft Java and Bedrock Edition servers. Built with Node.js, Express, and Tailwind CSS, it provides a sleek, modern interface with particle animations and confetti effects for a delightful user experience.
## Features
- Check status for Minecraft Java and Bedrock Edition servers.
- Displays server details like version, player count, MOTD, and more.
- Responsive design with Tailwind CSS.
- Interactive particle background using tsParticles.
- Confetti celebration on successful server status checks.
- URL-based server checks for direct access.
- Environment variable support for configuration.
## Prerequisites
- [Node.js](https://nodejs.org/) (v16 or higher)
- [npm](https://www.npmjs.com/) (v7 or higher)
- Status check binaries (configured via environment variables) https://git.ssh.surf/hypermc/mc-status
## Installation
1. **Clone the repository**:
```bash
git clone https://git.ssh.surf/hypermc/status-check.git
cd status-check
```
2. **Install dependencies**:
```bash
npm install
```
3. **Set up environment variables**:
Create a `.env` file in the root directory and configure the paths to your status check binaries:
```env
STATUS_CHECK_PATH=/path/to/java-status-check
GEYSER_STATUS_CHECK_PATH=/path/to/bedrock-status-check
```
Ensure the binaries are executable and return JSON output as expected by the application.
4. **Build CSS** (if modifying `style.css`):
Ensure Tailwind CSS is set up. If you have `tailwindcss` installed globally:
```bash
npx tailwindcss -i public/css/style.css -o public/css/style.min.css --minify
```
Alternatively, use the provided `style.min.css` for production.
5. **Run the application**:
```bash
node status_site.js
```
The server will start at `http://localhost:3066`.
## Usage
1. Open `http://localhost:3066` in your browser.
2. Select the server edition (Java or Bedrock).
3. Enter the connection string in the format `host:port` (e.g., `example.com:25565`).
4. Click "Check Status" to view the server status.
5. Alternatively, use a direct URL like `http://localhost:3066/java/example.com/25565` to check a server.
## Project Structure
```
minecraft-server-status-checker/
├── public/
│ ├── css/
│ │ ├── style.css # Tailwind CSS source
│ │ └── style.min.css # Minified CSS output
│ ├── js/
│ │ └── app.js # Client-side JavaScript
│ ├── favicon/ # Favicon assets
│ └── index.html # Main HTML page
├── .env # Environment variables (not tracked)
├── status_site.js # Express server
├── package.json # Node.js dependencies
└── README.md # This file
```
## Dependencies
- **Backend**:
- [express](https://expressjs.com/) - Web framework
- [dotenv](https://www.npmjs.com/package/dotenv) - Environment variable management
- [child_process](https://nodejs.org/api/child_process.html) - For executing status check binaries
- **Frontend**:
- [Tailwind CSS](https://tailwindcss.com/) - Styling
- [tsParticles](https://particles.js.org/) - Particle animations
- [canvas-confetti](https://www.npmjs.com/package/canvas-confetti) - Confetti effects
## Configuration
The application relies on two environment variables:
- `STATUS_CHECK_PATH`: Path to the Java Edition status check binary.
- `GEYSER_STATUS_CHECK_PATH`: Path to the Bedrock Edition status check binary.
These binaries should accept `-host` and `-port` arguments and output JSON data.