https://github.com/pedramcode/xray-demo-mock
XRay demo service mock executor (RabbitMQ)
https://github.com/pedramcode/xray-demo-mock
Last synced: 2 months ago
JSON representation
XRay demo service mock executor (RabbitMQ)
- Host: GitHub
- URL: https://github.com/pedramcode/xray-demo-mock
- Owner: pedramcode
- Created: 2025-08-13T13:27:09.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-08-13T13:34:59.000Z (8 months ago)
- Last Synced: 2025-08-13T15:37:36.176Z (8 months ago)
- Language: TypeScript
- Size: 102 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# xray-demo-mock
This project provides a mock implementation for the XRAY demo, designed to facilitate development and testing without requiring access to the full production environment.
## Features
- Mock services and endpoints for XRAY demo scenarios
- Easy setup for local development and integration testing
- Reuses core modules (`signal` and `rabbit`) from the main XRAY project for consistency
## Getting Started
### Prerequisites
- Node.js (version X or higher)
- npm or yarn
### Installation
Clone the repository:
```bash
git clone https://github.com/pedramcode/xray-demo-mock.git
cd xray-demo-mock
```
Install dependencies:
```bash
npm install
# or
yarn install
```
### Usage
Set `.env` file:
```ENV
RABBITMQ_URL=amqp://localhost:5672
```
Start the mock server:
```bash
npm start
# or
yarn start
```
The server will start on the default port (e.g., 3000). You can configure the port and other settings via environment variables.
## Project Structure
- `src/` - Main source code for the mock server and services
- `signal/` - Reused module from the main XRAY project for signaling functionality
- `rabbit/` - Reused module from the main XRAY project for RabbitMQ integration
## Reused Modules
This project reuses the following modules from the main XRAY project:
- **signal**: Provides signaling mechanisms for inter-service communication.
- **rabbit**: Handles RabbitMQ messaging and queue management.
Refer to the main XRAY project documentation for details on these modules.