Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/holodex/fs-db
https://github.com/holodex/fs-db
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/holodex/fs-db
- Owner: holodex
- Created: 2015-03-19T05:57:39.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-09-21T09:31:06.000Z (over 9 years ago)
- Last Synced: 2024-10-12T23:38:25.991Z (3 months ago)
- Language: JavaScript
- Size: 273 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-starred - holodex/fs-db - (others)
README
# fs-db
a silly **work in progress** to use the filesystem as a database.
the purpose is for apps to have human editable and readable data that can be iterated on easily (vim macros over sql migrations) and shared more openly (GitHub repos over JSON APIs).
## how to
### install
```
npm install --save fs-db
```### use
```
var FsDb = require('fs-db')var fsDb = FsDb({
location: __dirname + '/data',
})fsDb.createReadStream()
.pipe(process.stdout)
```#### FsDb(options)
possible `options` are:
- `location`: root filesystem directory of the database
- `codec`: codec to use (defaults to 'json'), see [codecs](./codecs)#### fsDb.createReadStream()
returns a readable [pull stream](https://npmjs.org/package/pull-stream) of objects with [JSON Pointer](https://npmjs.org/package/json-pointer) `id`s based on the path.