{"id":20596759,"url":"https://github.com/19eb/microservices-base","last_synced_at":"2025-06-12T02:39:28.696Z","repository":{"id":229152198,"uuid":"574879880","full_name":"19EB/microservices-base","owner":"19EB","description":"Nodejs project on microservices","archived":false,"fork":false,"pushed_at":"2022-12-09T08:00:51.000Z","size":45,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-14T23:51:46.312Z","etag":null,"topics":["api","architecture","backend","backend-api","express","expressjs","gateway-api","microservice","microservices","microservices-architecture","node","node-js","node-js-express","nodejs","rest","rest-api","restful","restful-api","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-06T09:23:12.000Z","updated_at":"2024-03-11T10:44:43.000Z","dependencies_parsed_at":"2024-03-22T10:39:57.206Z","dependency_job_id":null,"html_url":"https://github.com/19EB/microservices-base","commit_stats":null,"previous_names":["19eb/microservices-base"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/19EB/microservices-base","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/19EB%2Fmicroservices-base","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/19EB%2Fmicroservices-base/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/19EB%2Fmicroservices-base/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/19EB%2Fmicroservices-base/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/19EB","download_url":"https://codeload.github.com/19EB/microservices-base/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/19EB%2Fmicroservices-base/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259384177,"owners_count":22849209,"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":["api","architecture","backend","backend-api","express","expressjs","gateway-api","microservice","microservices","microservices-architecture","node","node-js","node-js-express","nodejs","rest","rest-api","restful","restful-api","typescript"],"created_at":"2024-11-16T08:18:30.728Z","updated_at":"2025-06-12T02:39:28.677Z","avatar_url":"https://github.com/19EB.png","language":"TypeScript","readme":"\n# microservices-base\n\n  \n\nBasic microservices project that includes a gateway (api-gateway) and 3 microservices (user/product/client)\n\nThis is just my personal project experimenting how the architecture works. \n  \n\n### Prerequisites\n\n  \n\n- Install [Node.js](https://nodejs.org/en/)\n\n  \n\n### Installing\n\n- Clone the repository\n\n```\n\ngit clone https://github.com/19EB/microservices-base\n\n```\n\n- Install dependencies on api-gateway\n\n```\n\ncd api-gateway\n\nnpm install\n\n```\n- Install dependencies on each microservice (user, product and client)\n```\n\ncd services/\u003cmicroservice\u003e\n\nnpm install\n\n```\n\n### Environment variables\n\nThis project uses the following environment variables:\n##### api-gateway\n```\n# Port\nPORT=8000\n# User service\nUSER_SERVICE_URL='http://localhost:8001'\n# Client service\nCLIENT_SERVICE_URL='http://localhost:8002'\n# Product service\nPRODUCT_SERVICE_URL='http://localhost:8003'\n```\n\n##### user\n```\n# Database\nDB=''\n# Service port\nPORT=8001\n# Other services\nCLIENT_SERVICE_URL='http://localhost:8002'\nPRODUCT_SERVICE_URL='http://localhost:8003'\n```\n##### client\n```\n# Database\nDB=''\n# Service port\nPORT=8002\n# Other services\nUSER_SERVICE_URL='http://localhost:8001'\nPRODUCT_SERVICE_URL='http://localhost:8003'\n```\n##### product\n```\n# Database\nDB=''\n# Service port\nPORT=8003\n# Other services\nUSER_SERVICE_URL='http://localhost:8001'\nCLIENT_SERVICE_URL='http://localhost:8002'\n```\n\n\n### Running the project\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","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F19eb%2Fmicroservices-base","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F19eb%2Fmicroservices-base","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F19eb%2Fmicroservices-base/lists"}