7 lines
213 B
TypeScript
7 lines
213 B
TypeScript
import path from "node:path";
|
|
|
|
// const db = await JSONFilePreset("db.json", { posts: [] });
|
|
|
|
// const post = { id: 1, title: "lowdb is awesome", views: 100 };
|
|
// await db.update(({ posts }) => posts.push(post));
|