This service consumes messages from a RabbitMQ queue called "opportunity" and stores them in a MongoDB database.
To deploy this service on Railway, follow these steps:
-
Fork this repository to your GitHub account.
-
Create a new project on Railway and connect it to your forked GitHub repository.
-
In the Railway project settings, add the following environment variables:
RABBITMQ_URL: Your RabbitMQ connection stringMONGODB_URL: Your MongoDB connection stringMONGODB_DB_NAME: The name of your MongoDB database (default: opportunities_db)MONGODB_COLLECTION_NAME: The name of your MongoDB collection (default: opportunities)
-
Railway will automatically detect the
Procfileand use it to start the service. -
Deploy your project on Railway.
To run this service locally:
- Install dependencies: