Back to articles
fjsondb: The Simplest JSON Database for Node.js (Zero Dependencies)

fjsondb: The Simplest JSON Database for Node.js (Zero Dependencies)

via Dev.toAlex Devson

Sometimes you don't need Postgres. Sometimes you don't even need SQLite. You just need to store some JSON and read it back. That's fjsondb . What Is It? A fast, file-based JSON database for Node.js. No server, no configuration, no dependencies. Just your data in a JSON file. Why? Prototyping and you need persistence NOW Small tools that don't justify a real database Configuration storage Local caching Any project where "just use a JSON file" is the right answer Usage import { FJsonDB } from ' fjsondb ' ; const db = new FJsonDB ( ' mydata.json ' ); // Write await db . set ( ' users.john ' , { name : ' John ' , age : 30 }); // Read const john = await db . get ( ' users.john ' ); // Delete await db . delete ( ' users.john ' ); That's it. No schema, no migrations, no ORM. Just get/set/delete. Features โšก Fast โ€” file I/O with intelligent caching ๐Ÿ“ฆ Zero dependencies โ€” just Node.js ๐Ÿ”‘ Dot notation โ€” nested paths like users.john.email ๐Ÿ’พ Persistent โ€” survives restarts ๐Ÿ”’ Atomic writes โ€” no corrupt

Continue reading on Dev.to

Opens in a new tab

Read Full Article
2 views

Related Articles