Magnet is a real-time application for receiving client requests and sending them to multiple servers. This app is built using Node.js and Socket.io for real-time communication.
- Node.js (version 10 or above)
- Clone the repository
- Install the dependencies using
npm install
- Create a
.env
file and update the values for the following environment variables:PORT
: the port number for the serverREDIS_HOST
: the hostname for the Redis serverREDIS_PORT
: the port number for the Redis serverRABBITMQ_URL
: the URL for the RabbitMQ server
- Start the server using
npm start
Once the server is running, clients can connect to the server using the Socket.io client library. Clients can send requests to the server and the server will forward the requests to the appropriate servers based on the request parameters.
This project uses the following dependencies:
- amqplib - a client library for RabbitMQ
- axios - a promise-based HTTP client
- cors - a middleware for handling Cross-Origin Resource Sharing (CORS)
- dotenv - a zero-dependency module for loading environment variables
- redis - a client library for Redis
- socket.io - a real-time engine for Node.js
This project is licensed under the ISC License - see the LICENSE.md file for details.