{"id":18085003,"url":"https://github.com/coderofsalvation/dpd-filebased-mongodb","last_synced_at":"2025-06-11T16:07:48.945Z","repository":{"id":146965135,"uuid":"74207940","full_name":"coderofsalvation/dpd-filebased-mongodb","owner":"coderofsalvation","description":"run deployd without mongodb (but a jsonfile instead to store data)","archived":false,"fork":false,"pushed_at":"2020-05-28T18:49:03.000Z","size":7,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-06T00:13:48.021Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coderofsalvation.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"custom":"https://gumroad.com/l/hGYGh"}},"created_at":"2016-11-19T12:43:08.000Z","updated_at":"2021-01-08T00:07:30.000Z","dependencies_parsed_at":"2023-05-05T22:30:27.065Z","dependency_job_id":null,"html_url":"https://github.com/coderofsalvation/dpd-filebased-mongodb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/coderofsalvation/dpd-filebased-mongodb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderofsalvation%2Fdpd-filebased-mongodb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderofsalvation%2Fdpd-filebased-mongodb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderofsalvation%2Fdpd-filebased-mongodb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderofsalvation%2Fdpd-filebased-mongodb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coderofsalvation","download_url":"https://codeload.github.com/coderofsalvation/dpd-filebased-mongodb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderofsalvation%2Fdpd-filebased-mongodb/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259293374,"owners_count":22835601,"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-10-31T15:09:01.509Z","updated_at":"2025-06-11T16:07:48.921Z","avatar_url":"https://github.com/coderofsalvation.png","language":"JavaScript","funding_links":["https://gumroad.com/l/hGYGh"],"categories":[],"sub_categories":[],"readme":"run deployd without mongodb (but a jsonfile instead to store data)\n\n\u003cimg src=\"https://media0.giphy.com/media/3o7TKDMPKsakcn9NU4/200.gif\" width=\"150\" style=\"width:150px\"/\u003e\n\n## Usage \n\n    $ npm install dpd-filebased-mongodb mongo-mock --save\n    $ mkdir data\n    $ export MONGO_DB_FILE=data/mongo.js\n    $ node app.js\n\nNow make sure you include it *before* deployd itself in your `app.js`:\n\n\t\trequire('dpd-filebased-mongodb')           // \u003c-- magic right there\n\t\tvar deployd = require('deployd')\n\t\tvar dpd = deployd({port:3000});\n\t\tdpd.listen();\n\n\u003e That's it! Now your data is stored in `data/mongodb.js` \n\n## Why \n\n* Sometimes you want to use deployd for simple api's without the mongodb-requirement.\n* Sometimes you want to test deployd with a fake mongodb\n\n## Notes \n\n* to specify a different dbfile, specify environment variable `MONGO_DB_FILE=\"data/foo.js\"` etc\n* it doesn't run *all* mongo-queries, see [mongo-mock](https://npmjs.org/package/mongomock)\n* because of this, `hide(field)` doesn't always work (solution: put `if( this.password ) delete this.password` into event-code)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderofsalvation%2Fdpd-filebased-mongodb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoderofsalvation%2Fdpd-filebased-mongodb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderofsalvation%2Fdpd-filebased-mongodb/lists"}