1.0.1 • Published 6 years ago

fs8 v1.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

fs8

It's a stable JSON database module that doesn't lose your data due to high traffic and comes with built-in LZMA file compression.

Usage

const fs8 = require("fs8");

Good Practice

If you're running on a large database which is very frequently altered, you might not want to save the data every time there is an edit.

Instead, it is recommended that you save on an interval. Here is an example, which saves the data variable to data.fs8 every minute.

const fs8 = require("fs8");
const data = fs8.load("data.fs8");
setInterval(() => {
	fs8.save("data.fs8", data);
}, 60000);
// Then do whatever you want with `data` down here.

This way, if the process ever crashes, you'll lose a minute of data, but you'll also not have to deal with the high processing power of repeatedly stringifying, compressing, and writing.

1.0.1

6 years ago

1.0.0

6 years ago