{"id":20199911,"url":"https://github.com/fortunejs/fortune-fs","last_synced_at":"2025-04-10T11:09:12.896Z","repository":{"id":57241036,"uuid":"73758405","full_name":"fortunejs/fortune-fs","owner":"fortunejs","description":"File system adapter for Fortune.","archived":false,"fork":false,"pushed_at":"2024-07-16T16:09:37.000Z","size":35,"stargazers_count":5,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T09:52:57.162Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fortunejs.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-11-15T00:06:54.000Z","updated_at":"2024-07-16T16:09:40.000Z","dependencies_parsed_at":"2024-05-09T22:36:43.112Z","dependency_job_id":"55534e99-40d3-4c78-8efc-feb887f6ff09","html_url":"https://github.com/fortunejs/fortune-fs","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fortunejs%2Ffortune-fs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fortunejs%2Ffortune-fs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fortunejs%2Ffortune-fs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fortunejs%2Ffortune-fs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fortunejs","download_url":"https://codeload.github.com/fortunejs/fortune-fs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247987184,"owners_count":21028891,"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-11-14T04:40:25.280Z","updated_at":"2025-04-10T11:09:12.877Z","avatar_url":"https://github.com/fortunejs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fortune File System Adapter\n\n![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/fortunejs/fortune-fs/test.yml)\n[![npm Version](https://img.shields.io/npm/v/fortune-fs.svg?style=flat-square)](https://www.npmjs.com/package/fortune-fs)\n[![License](https://img.shields.io/npm/l/fortune.svg?style=flat-square)](https://raw.githubusercontent.com/fortunejs/fortune-fs/master/LICENSE)\n\nThis is a file system adapter for Fortune.js.\n\n```sh\n$ npm install fortune-fs --save\n```\n\n\n## Usage\n\n```js\nconst path = require('path')\nconst fortune = require('fortune')\nconst fsAdapter = require('fortune-fs')\n\nconst store = fortune(recordTypes, {\n  adapter: [ fsAdapter, {\n    // Absolute path to database directory.\n    path: path.join(__dirname, 'db')\n  } ]\n})\n```\n\n\n## Options\n\n\n| Option | Default |  |\n| --- | --- | ---|\n| `concurrentReads`| `128` | limits how many files can be read concurrently by `Adapter.find()` |\n\n### Options Example\n\n```js\nconst path = require('path')\nconst fortune = require('fortune')\nconst fsAdapter = require('fortune-fs')\n\nconst store = fortune(recordTypes, {\n  adapter: [ fsAdapter, {\n    // Absolute path to database directory.\n    path: path.join(__dirname, 'db'),\n    concurrentReads: 32\n  } ]\n})\n```\n\n\n## Troubleshooting\n\nIf you have a large number of records (files), you may encounter `Error: EMFILE: too many open files`. Set the `concurrentReads` [option](#options) to a lower value to resolve this.\n\n\n## License\n\nThis software is licensed under the [MIT license](https://raw.githubusercontent.com/fortunejs/fortune-fs/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffortunejs%2Ffortune-fs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffortunejs%2Ffortune-fs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffortunejs%2Ffortune-fs/lists"}