{"id":20596757,"url":"https://github.com/19eb/microservices-base-rabbitmq","last_synced_at":"2025-04-14T23:51:40.619Z","repository":{"id":229152199,"uuid":"575441731","full_name":"19EB/microservices-base-rabbitmq","owner":"19EB","description":"Nodejs project on microservices using RabbitMQ as messaging queue","archived":false,"fork":false,"pushed_at":"2022-12-09T08:00:37.000Z","size":51,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T11:51:11.431Z","etag":null,"topics":["amqp","api","architecture","express","messaging-queue","microservice","microservices","microservices-architecture","node-js","nodejs","rabbitmq","rest","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/19EB.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-12-07T14:20:50.000Z","updated_at":"2024-12-29T01:34:44.000Z","dependencies_parsed_at":"2024-03-22T10:29:49.577Z","dependency_job_id":"6b0a2424-7618-4757-aafc-5784d6c51538","html_url":"https://github.com/19EB/microservices-base-rabbitmq","commit_stats":null,"previous_names":["19eb/microservices-base-rabbitmq"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/19EB%2Fmicroservices-base-rabbitmq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/19EB%2Fmicroservices-base-rabbitmq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/19EB%2Fmicroservices-base-rabbitmq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/19EB%2Fmicroservices-base-rabbitmq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/19EB","download_url":"https://codeload.github.com/19EB/microservices-base-rabbitmq/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248981259,"owners_count":21193144,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["amqp","api","architecture","express","messaging-queue","microservice","microservices","microservices-architecture","node-js","nodejs","rabbitmq","rest","typescript"],"created_at":"2024-11-16T08:18:30.436Z","updated_at":"2025-04-14T23:51:40.600Z","avatar_url":"https://github.com/19EB.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n  \n# microservices-base-rabbitmq\n\nBasic microservices project that includes a gateway (api-gateway) and 3 microservices (user/product/client) and a messaging queue\n\nThis variation utilizes RabbitMQ as the messaging queue so if one microservice goes down, it will receive messages when it gets back up.\n  \n\n### Prerequisites\n\n  \n\n- Install [Node.js](https://nodejs.org/en/)\n- Install [RabbitMQ](https://www.rabbitmq.com/) or run it in a Docker container with the included compose file. Alternatively you can use their cloud solution at [CloudAMQP](https://www.cloudamqp.com/)\n\n  \n\n### Installing\n\n- Clone the repository\n\n```\ngit clone https://github.com/19EB/microservices-base\n```\n\n- Install dependencies on api-gateway\n\n```\ncd api-gateway\n\nnpm install\n```\n- Install dependencies on each microservice (user, product and client)\n```\ncd services/\u003cmicroservice\u003e\n\nnpm install\n```\n\n### Environment variables\n\nThis project uses the following environment variables:\n##### api-gateway\n```\n# Port\nPORT=8000\n\n# User service\nUSER_SERVICE_URL='http://localhost:8001'\n\n# Client service\nCLIENT_SERVICE_URL='http://localhost:8002'\n\n# Product service\nPRODUCT_SERVICE_URL='http://localhost:8003'\n```\n\n##### microservice\n```\n# Database\nDB=''\n\n# Service port\nPORT=8001\n\n# RabbitMQ configuration (use local or cloud url here)\nMESSAGE_BROKER_URL=''\n```\n\n### Running the project\n\n- If you plan on using Docker for running RabbitMQ, I have included \"rabbitmq\" folder that contains the docker-compose file.\n\n```\ncd rabbitmq\ndocker-compose up -d\n```\n\n- Start each microservice from its own directory\n\nDevelopment mode\n```\ncd services/\u003cmicroservice\u003e\n\nnpm run dev\n```\nProduction mode\n```\ncd services/\u003cmicroservice\u003e\n\nnpm start\n```\n\n- Start the api-gateway\n```\ncd api-gateway\n\nnpm start\n\nor\n\nnpm run dev\n```\nNavigate to `http://localhost:8000`\n\n### Endpoints\n\nThe project has couple endpoints to ping each other and one normal endpoint.\n\n  \n\n`http://localhost:8000/user/list`\n\n`http://localhost:8000/user/ping-client`\n\n`http://localhost:8000/user/ping-product`\n\n  \n\n`http://localhost:8000/client/list`\n\n`http://localhost:8000/client/ping-user`\n\n`http://localhost:8000/client/ping-product`\n\n  \n\n`http://localhost:8000/product/list`\n\n`http://localhost:8000/product/ping-user`\n\n`http://localhost:8000/product/ping-client`\n\n  \n\n## License\n\n  \n\nThis project is licensed under the MIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F19eb%2Fmicroservices-base-rabbitmq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F19eb%2Fmicroservices-base-rabbitmq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F19eb%2Fmicroservices-base-rabbitmq/lists"}