@themrdev/json.db
v0.2.0
Published
A simple JSON database for Node.js
Downloads
12
Readme
json.db
Simple JSON database for Bun.js
[!WARNING] This package is still in development and only works with Bun.js
Creating a database
import { Database } from ".";
const db = new Database({
dir: "./db", // where the database will be stored
});
Schemas and Models
import { Database, SchemaTypes } from ".";
// Basic usage of the database with a schema
const PostSchema = db.createSchema({
name: "post",
fields: [
{
name: "title",
type: SchemaTypes.String,
},
{
name: "content",
type: SchemaTypes.String,
},
],
});