{"id":19656492,"url":"https://github.com/daggerok/node-cqrs","last_synced_at":"2026-04-15T10:32:33.746Z","repository":{"id":151041888,"uuid":"88321676","full_name":"daggerok/node-cqrs","owner":"daggerok","description":"This repository contains CQRS application using node/express, servicebus-* + rabbitmq mongo and docker (e2e tests with swarm cluster included)","archived":false,"fork":false,"pushed_at":"2017-10-04T08:06:31.000Z","size":40,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-27T02:22:52.484Z","etag":null,"topics":["cqrs","docker","docker-cluster","docker-compose","docker-stack","docker-stack-deploy","docker-swarm","docker-swarm-cluster","mongodb","mongoose","nodejs","rabbitmq","servicebus"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/daggerok.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":null,"license":null,"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,"publiccode":null,"codemeta":null}},"created_at":"2017-04-15T03:40:39.000Z","updated_at":"2017-11-05T00:39:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"7601cec3-fb39-4f59-b9d7-8643d969c032","html_url":"https://github.com/daggerok/node-cqrs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/daggerok/node-cqrs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daggerok%2Fnode-cqrs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daggerok%2Fnode-cqrs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daggerok%2Fnode-cqrs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daggerok%2Fnode-cqrs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daggerok","download_url":"https://codeload.github.com/daggerok/node-cqrs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daggerok%2Fnode-cqrs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31837165,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T10:26:52.245Z","status":"ssl_error","status_checked_at":"2026-04-15T10:26:51.649Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cqrs","docker","docker-cluster","docker-compose","docker-stack","docker-stack-deploy","docker-swarm","docker-swarm-cluster","mongodb","mongoose","nodejs","rabbitmq","servicebus"],"created_at":"2024-11-11T15:27:57.052Z","updated_at":"2026-04-15T10:32:33.705Z","avatar_url":"https://github.com/daggerok.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"= node-cqrs image:https://travis-ci.org/daggerok/node-cqrs.svg?branch=master[\"Build Status\", link=\"https://travis-ci.org/daggerok/node-cqrs\"]\n\nThis repository contains CQRS application using node/express, servicebus-* + rabbitmq mongo and docker (swarm cluster included)\n\n_TODO: not yet finished..._\n\n----\n(ui update data) \u003e\u003e\n    [produce command] \u003e\u003e\n        [handle rabbit event] \u003e\u003e\n            [save data into eventstore mongodb (master node)]\n...\neventual consistency\n...\n(ui fetch data) \u003e\u003e | pooling | websockets | backpreassure\n    [query view / projection] \u003e\u003e\n        [get data from mongodb (replica node)]\n----\n\ndone:\n\n. implemented docker infrastructure: rabbitmq, mongo\n. message-frontend app\n. message-command app\n. message-store app\n\n\n.send message via REST API to RabbitMQ message broker\n[sources,bash]\n----\nhttp post :3001/api/v1/messages content='some data as messages.create type event'\n----\n\n.automation e2e tests using docker swarm / docker stack deploy (required docker / swarm / compose and httpie installed)\n[sources,bash]\n----\nyarn -i\nbash e2e-tests/docker-swarm.bash\n----\n\n.automation e2e tests using docker-compose (required docker compose and httpie installed)\n[sources,bash]\n----\nyarn -i\nbash e2e-tests/docker-compose.bash\n----\n\n.manual e2e testing using docker-compose (required docker compose and httpie installed)\n[sources,bash]\n----\nyarn -i\ndocker-compose -f docker/docker-compose-application-services.yml up -d --build\nhttp :3001\ndocker-compose -f docker/docker-compose-application-services.yml down -v\n----\n\n.development\n[sources,bash]\n----\nyarn -i\nyarn start\nyarn stop\n\nyarn global add npm-check-updates\nncu -u\n----\n\nlinks:\n\n. link:http://expressjs.com/en/4x/api.html[express]\n. link:https://www.terlici.com/2015/04/03/mongodb-node-express.html[mongodb-express]\n. link:https://www.rabbitmq.com/[rabbitmq]\n. link:https://www.npmjs.com/package/servicebus[servicebus]\n. link:https://github.com/mateodelnorte/servicebus-retry[servicebus-retry]\n. link:https://github.com/mateodelnorte/servicebus-register-handlers[servicebus-register-handlers]\n. link:https://github.com/mateodelnorte/servicebus-trace[servicebus-trace]\n. link:http://nycnode.com/videos/matt-walters-how-to-cqrs-in-node-eventually-consistent-unidirectional-systems-with-microservices[how to cqrs in node talk]\n. link:https://www.youtube.com/watch?v=X_VHWQa1k0k[Eventually Consistent Distributed Systems with Node.js for Finance]\n\ndocker links:\n\n. https://docs.docker.com/get-started\n. https://docs.docker.com/compose/compose-file/\n\n----\nocker build -t friendlyname .  # Create image using this directory's Dockerfile\ndocker run -p 4000:80 friendlyname  # Run \"friendlyname\" mapping port 4000 to 80\ndocker run -d -p 4000:80 friendlyname         # Same thing, but in detached mode\ndocker container ls                                # List all running containers\ndocker container ls -a             # List all containers, even those not running\ndocker container stop \u003chash\u003e           # Gracefully stop the specified container\ndocker container kill \u003chash\u003e         # Force shutdown of the specified container\ndocker container rm \u003chash\u003e        # Remove specified container from this machine\ndocker container rm $(docker container ls -a -q)         # Remove all containers\ndocker image ls -a                             # List all images on this machine\ndocker image rm \u003cimage id\u003e            # Remove specified image from this machine\ndocker image rm $(docker image ls -a -q)   # Remove all images from this machine\ndocker login             # Log in this CLI session using your Docker credentials\ndocker tag \u003cimage\u003e username/repository:tag  # Tag \u003cimage\u003e for upload to registry\ndocker push username/repository:tag            # Upload tagged image to registry\ndocker run username/repository:tag                   # Run image from a registry\n\ndocker stack ls                                            # List stacks or apps\ndocker stack deploy -c \u003ccomposefile\u003e \u003cappname\u003e  # Run the specified Compose file\ndocker service ls                 # List running services associated with an app\ndocker service ps \u003cservice\u003e                  # List tasks associated with an app\ndocker inspect \u003ctask or container\u003e                   # Inspect task or container\ndocker container ls -q                                      # List container IDs\ndocker stack rm \u003cappname\u003e                             # Tear down an application\n\ndocker-machine create --driver virtualbox myvm1 # Create a VM (Mac, Win7, Linux)\ndocker-machine create -d hyperv --hyperv-virtual-switch \"myswitch\" myvm1 # Win10\ndocker-machine env myvm1                # View basic information about your node\ndocker-machine ssh myvm1 \"docker node ls\"         # List the nodes in your swarm\ndocker-machine ssh myvm1 \"docker node inspect \u003cnode ID\u003e\"        # Inspect a node\ndocker-machine ssh myvm1 \"docker swarm join-token -q worker\"   # View join token\ndocker-machine ssh myvm1   # Open an SSH session with the VM; type \"exit\" to end\ndocker-machine ssh myvm2 \"docker swarm leave\"  # Make the worker leave the swarm\ndocker-machine ssh myvm1 \"docker swarm leave -f\" # Make master leave, kill swarm\ndocker-machine start myvm1            # Start a VM that is currently not running\ndocker-machine stop $(docker-machine ls -q)               # Stop all running VMs\ndocker-machine rm $(docker-machine ls -q) # Delete all VMs and their disk images\ndocker-machine scp docker-compose.yml myvm1:~     # Copy file to node's home dir\ndocker-machine ssh myvm1 \"docker stack deploy -c \u003cfile\u003e \u003capp\u003e\"   # Deploy an app\n----\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaggerok%2Fnode-cqrs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaggerok%2Fnode-cqrs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaggerok%2Fnode-cqrs/lists"}