I don't know if its a mistake on my end or a problem with codesandbox. I tryed a very basic setup with lowdb where i can load data from a json-file (so the connection is established) but the db.write() statement simply don't work.
Has anyone an explanation/ solution for me? =(
https://codesandbox.io/s/stoic-cache-ne2n10?file=/src/index.js
import { LowSync, JSONFileSync } from "lowdb";
const db = new LowSync(new JSONFileSync("/src/file.json"));
const a = async () => {
await db.read();
db.data.test2 = "123";
console.log(db.data);
await db.write();
await db.read();
console.log(db.data);
};
a();