fjsondb
Tiny JSON file database for Node.js and TypeScript. Save and read data by key in one plain JSON file, with no database server to run
- Platform
- Libraries
- Category
- Developer Tools
- Available from
- npm
About this app
fjsondb is a small JSON file database for Node.js and TypeScript. For a CLI, a bot, a prototype or some config, setting up a real database is too much, and writing your own read-and-save code for a JSON file gets messy fast. fjsondb keeps your data in one plain JSON file and gives you simple set, get, has and delete calls, with no server to run.
I made it because I was doing a lot of automation with Playwright and other tools, and needed somewhere to store data so I could check it later. The other solutions felt bulky for that, so I made my own.
- Plain JSON on disk: open the file in any editor and read it.
- Save any value: numbers, text, true or false, and nested objects.
- Counters built in:
incrementNumberanddecrementNumbercreate the key at 0 if it is missing. - Find keys by value:
getKeysByMatchedValuegives you every key that holds a value. - As many files as you like: one database per file.
- TypeScript types included.
Great for CLIs, bots, small tools and quick prototypes.
Install
npm install fjsondb
import { Fjsondb } from 'fjsondb'
const db = new Fjsondb('./data/test.json')
db.set('name', 'Fayaz')
db.get('name') // 'Fayaz'
Want simple storage for your bot, script or automation? Contact me through my portfolio: https://p32929.github.io