52 lines
1.6 KiB
Markdown
52 lines
1.6 KiB
Markdown
# MovieBox API Server
|
|
|
|
A robust Node.js API server for accessing MovieBox content, featuring advanced session management, anti-ban protection, and a clean RESTful interface.
|
|
|
|
## Features
|
|
|
|
- **Session Management**: Automatic cookie persistence and User-Agent rotation to prevent IP bans.
|
|
- **Anti-Ban**: Intelligent retry logic with exponential backoff for 403/429 errors.
|
|
- **Request Logging**: Detailed logging of incoming requests and outgoing API calls for easy debugging.
|
|
- **Concurrency Support**: Per-request session isolation ensures stability under high load (no cross-user session pollution).
|
|
- **Unified Sources**: `/sources` endpoint that aggregates download and stream links with auto-fallback.
|
|
- **Health Check**: `/apicheck` endpoint for monitoring server status.
|
|
- **Startup Banner**: Professional ASCII art banner with server status information.
|
|
|
|
## Installation
|
|
|
|
1. Clone the repository.
|
|
2. Install dependencies:
|
|
```bash
|
|
npm install
|
|
```
|
|
|
|
3. Configure environment variables:
|
|
Create a `.env` file in the root directory:
|
|
```env
|
|
PORT=5000
|
|
API_KEY=cineprime_secure_key_2024
|
|
```
|
|
|
|
## Usage
|
|
|
|
Start the server:
|
|
```bash
|
|
node index.js
|
|
```
|
|
The server will start on port **5000** (default).
|
|
|
|
## API Documentation
|
|
|
|
See [API.md](API.md) for detailed endpoint documentation.
|
|
|
|
## Key Endpoints
|
|
|
|
- `GET /api/home` - Get homepage content.
|
|
- `GET /api/search?keyword=...` - Search for content.
|
|
- `GET /api/detail?subjectId=...` - Get content details.
|
|
- `GET /api/sources?subjectId=...` - Get stream/download links.
|
|
- `GET /api/apicheck` - Server health check.
|
|
|
|
## License
|
|
MIT
|