{"id":22278400,"url":"https://github.com/voiddevsorg/fastify-mongo-store","last_synced_at":"2025-03-25T18:21:54.815Z","repository":{"id":184782263,"uuid":"672469300","full_name":"VoidDevsorg/fastify-mongo-store","owner":"VoidDevsorg","description":"A fastify session store using MongoDB","archived":false,"fork":false,"pushed_at":"2023-07-30T07:43:38.000Z","size":21,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-01-30T15:49:14.321Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@voidpkg/fastify-mongo-store","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/VoidDevsorg.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}},"created_at":"2023-07-30T07:32:05.000Z","updated_at":"2024-12-22T11:43:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"2b2d16f7-0479-4cbe-b3c7-1d265138ed9a","html_url":"https://github.com/VoidDevsorg/fastify-mongo-store","commit_stats":null,"previous_names":["voiddevsorg/fastify-mongo-store"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VoidDevsorg%2Ffastify-mongo-store","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VoidDevsorg%2Ffastify-mongo-store/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VoidDevsorg%2Ffastify-mongo-store/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VoidDevsorg%2Ffastify-mongo-store/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VoidDevsorg","download_url":"https://codeload.github.com/VoidDevsorg/fastify-mongo-store/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245516915,"owners_count":20628249,"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-03T15:14:26.823Z","updated_at":"2025-03-25T18:21:54.789Z","avatar_url":"https://github.com/VoidDevsorg.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @voidpkg/fastify-mongo-store\r\n\r\n![node version](https://img.shields.io/badge/node%20-%3E=%2018.x-brightgreen.svg)\r\n[![License: MIT](https://img.shields.io/badge/License-MIT-brightgreen.svg)](https://opensource.org/licenses/MIT)\r\n\r\n## Introduction\r\n\r\nA [MongoDB](https://github.com/mongodb/node-mongodb-native) session store for [@fastify/session](https://github.com/fastify/session). By default [@fastify/session](https://github.com/fastify/session) uses in-memory storage to store sessions. With this small package you can store sessions on an **MongoDB** database instead.\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm i --save @voidpkg/fastify-mongo-store\r\n# or\r\nyarn add @voidpkg/fastify-mongo-store\r\n```\r\n\r\n## Usage\r\n\r\nUse with `@fastify/session`'s `store` property.\r\n\r\n```ts\r\nimport { Store } from \"@voidpkg/fastify-mongo-store\";\r\nimport fastify from \"fastify\";\r\n\r\nconst app = fastify();\r\n\r\napp.register(require(\"@fastify/cookie\"));\r\napp.register(require(\"@fastify/session\"), {\r\n    secret: \"a secret with minimum length of 32 characters\",\r\n    store: new Store({\r\n        collection: \"sessions\",\r\n        url: \"mongodb://127.0.0.1:27017\",\r\n        database: \"fastify-mongodb-store\"\r\n    })\r\n});\r\n```\r\n\r\n---\r\n\u003cbr\u003e\r\n\u003cdiv align=\"center\"\u003e\r\n    \u003cp\u003e© 2019 — 2023 \u003ca href=\"https://voiddevs.org\"\u003eVoid Development, Ltd.\u003c/a\u003e All rights reserved.\u003c/p\u003e\r\n\u003c/div\u003e\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoiddevsorg%2Ffastify-mongo-store","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvoiddevsorg%2Ffastify-mongo-store","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoiddevsorg%2Ffastify-mongo-store/lists"}