{"id":22206695,"url":"https://github.com/michaelcade/pacman-mongodb-external","last_synced_at":"2025-03-25T03:46:57.720Z","repository":{"id":264967981,"uuid":"850226806","full_name":"MichaelCade/pacman-mongodb-external","owner":"MichaelCade","description":"A repository to help demonstrate the importance of backup of MongoDB replicasets using Pac-Man as a front end \"mission-critical\" application scoring \"mission-critical\" high scores. ","archived":false,"fork":false,"pushed_at":"2024-08-31T07:51:20.000Z","size":1225,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-16T06:41:20.782Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MichaelCade.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":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-31T07:41:55.000Z","updated_at":"2024-08-31T07:51:24.000Z","dependencies_parsed_at":"2024-11-27T02:16:43.407Z","dependency_job_id":null,"html_url":"https://github.com/MichaelCade/pacman-mongodb-external","commit_stats":null,"previous_names":["michaelcade/pacman-mongodb-external"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MichaelCade%2Fpacman-mongodb-external","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MichaelCade%2Fpacman-mongodb-external/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MichaelCade%2Fpacman-mongodb-external/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MichaelCade%2Fpacman-mongodb-external/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MichaelCade","download_url":"https://codeload.github.com/MichaelCade/pacman-mongodb-external/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245394784,"owners_count":20608123,"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":[],"created_at":"2024-12-02T18:16:53.975Z","updated_at":"2025-03-25T03:46:57.691Z","avatar_url":"https://github.com/MichaelCade.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pac-Man\nPac-Man Demo App for use with external MongoDB replicaset \n\nYou will find (bad of me I know) the config.js has some hard coded mongodb connection values, if you are looking to connect this to your environment then please change here. \n\nThis code base originates from demos created for a demo in Kubernetes so there maybe warnings and errors related to this being ran inside a Kubernetes cluster. \n\nCode is for demo purposes only \n\nThis demo consists of 3 virtual machines running in a vSphere environment but could be anywhere on a network, and this application running in a docker container. I provisioned the MongoDB replicaset using terraform and ansible and will share that code in another repository. \n\n![](pacman-mongodb-external1.png)\n\n## Development instructions\n\n#### Getting started\n\nBuild the image locally once, to check everything is working fine\n```\n./scripts/build.sh\n```\n\nOnce inside the build environment, you can use\n```\nnpm install\n```\nto update/install newer versions of the Node.js packages used by the app.\n\nIf you don't see any error, you should proceed with starting the development environment\n```\n./scripts/dev.sh\n```\n\nYou should be inside one container, on the same network as a running MongoDB database server.\n```\nnpm run dev\n```\n\nYou should see your Node.js server logs, keep the server running.\nOpen a new browser windows, navigate to `http://localhost:8000/`, you should see the Pac-Man game.\n\n## Create Application Artifacts\n\n### Docker Container Image\n\nThe [Dockerfile](Dockerfile) performs the following steps:\n\n1. It is based on the latest Node.js.\n1. It then ADD the Pac-Man game into the configured application directory.\n1. Exposes port 8080 for the web server.\n1. Starts the Node.js application using `npm start`.\n\nTo build the image in preparation for hosting it to your own repo, run:\n\n```\ndocker build -t \u003cregistry\u003e/\u003cuser\u003e/pacman .\n```\n\nYou can test the image by running:\n\n```\ndocker run -p 8000:8080 \u003cregistry\u003e/\u003cuser\u003e/pacman\n```\nNote: You will need a working MongoDB backend. Look at [scripts/dev.sh] to understand how you can setup a local one on your machine using an insecure password, for development purposes only.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaelcade%2Fpacman-mongodb-external","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichaelcade%2Fpacman-mongodb-external","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaelcade%2Fpacman-mongodb-external/lists"}