{"id":20208025,"url":"https://github.com/gkampitakis/mongodb-change-streams","last_synced_at":"2026-04-09T22:34:42.644Z","repository":{"id":45075654,"uuid":"308146426","full_name":"gkampitakis/mongodb-change-streams","owner":"gkampitakis","description":"Testing change streams feature in mongodb","archived":false,"fork":false,"pushed_at":"2022-08-22T13:34:02.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-13T21:09:48.158Z","etag":null,"topics":["change-streams","docker-compose","fastify","mongodb","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/gkampitakis.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}},"created_at":"2020-10-28T21:34:42.000Z","updated_at":"2022-01-10T19:50:35.000Z","dependencies_parsed_at":"2022-08-26T10:00:23.580Z","dependency_job_id":null,"html_url":"https://github.com/gkampitakis/mongodb-change-streams","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gkampitakis%2Fmongodb-change-streams","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gkampitakis%2Fmongodb-change-streams/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gkampitakis%2Fmongodb-change-streams/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gkampitakis%2Fmongodb-change-streams/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gkampitakis","download_url":"https://codeload.github.com/gkampitakis/mongodb-change-streams/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241644554,"owners_count":19996179,"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":["change-streams","docker-compose","fastify","mongodb","nodejs"],"created_at":"2024-11-14T05:33:48.694Z","updated_at":"2025-11-29T23:05:42.206Z","avatar_url":"https://github.com/gkampitakis.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e Mongodb Change Streams \u003c/h1\u003e\n\n\u003cp\u003e\n\n\u003cimg src=\"https://webassets.mongodb.com/_com_assets/cms/MongoDB_Logo_FullColorBlack_RGB-4td3yuxzjs.png\"\u003e\n\n\u003c/p\u003e\n\n## Table of contents\n\n-   [Description](#Description)\n-   [Prerequisites](#Prerequisites)\n-   [Usage](#Usage)\n-   [Resources](#Resources)\n\n## Description\n\nChange Streams give the ability to applications monitor data-changes and react to this changes on a single collection, a database or an entire deployment.\n\n## Prerequisites\n\nIf you want to run the code in this repository you will need to spin up `fastify server` that produces new data changes in mongodb, a listener service that listen to data changes and of course you' ll need a mongodb in [replica set or shared clusters](https://docs.mongodb.com/manual/changeStreams/#availability).\n\nI have provide a `docker-compose.yml` file in order to run locally mongodb in replica set. [For information on how to set it](https://gist.github.com/asoorm/7822cc742831639c93affd734e97ce4f).\n\n## Usage\n\n-   Install dependencies by running `npm i`.\n-   Start ***fastify-server*** with `npm run start:server`\n-   Start on another cmd the ***listener*** with `npm run start:listener`\n\nI have provided a postman collection that you can use to do requests to \n***fastify-server*** or you can just use `curl` command.\n\n```bash\n# Insert Event\ncurl -X POST -H \"Content-Type: application/json\" \\\n    -d '{\"message\": \"Hello World\"}' \\\n    http://localhost:5000/notification\n\n# Update Event \ncurl -X PUT -H \"Content-Type: application/json\" \\\n    -d '{\"message\": \"test\"}' \\\n    http://localhost:5000/notification/\u003cid\u003e\n\n# Delete Event\ncurl -X DELETE \\\n    http://localhost:5000/notification/\u003cid\u003e\n```\n\n## Resources\n\nFor more information you can start \n- [From official docs about changeStreams](https://docs.mongodb.com/manual/changeStreams/)\n- [An introduction to change streams](https://www.mongodb.com/blog/post/an-introduction-to-change-streams)\n-  [Change Events](https://docs.mongodb.com/manual/reference/change-events)\n\n\u003cp align=\"center\"\u003e\n✌️ \u003ca href=\"https://github.com/gkampitakis/mongodb-change-streams/issues/new\"\u003eFor any questions or issues\u003c/a\u003e ✌️\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgkampitakis%2Fmongodb-change-streams","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgkampitakis%2Fmongodb-change-streams","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgkampitakis%2Fmongodb-change-streams/lists"}