An easy to use package that makes database with JSON.
How to install:
npm install daniel.db
Methods:
create()
const DanielDB = require("daniel.db")
const db = new DanielDB({ name: "main" })
add()
db.add('joins', 1)
set()
db.set(`name`, 'daniel')
get()
db.get(`name`)
has()
db.has(`name`)
delete()
db.delete(`name`)
deleteAll()
db.deleteAll()
all()
db.all()
push()
db.push(`name`, 'hello')
reset()
db.reset(`joins`)
WARNING: ⚠
If you're using nodemon
, please use the --ignore
file to ignore all the json files, or else your project will restart every time the database getting updated.
Example:
nodemon fileName.js --ignore *.json
If do you want to run your main file, dont write the [fileName]
in the command.
Need help? Contact me via Discord or Email!