Skip to content

Latest commit

 

History

History
56 lines (39 loc) · 1.39 KB

readme.md

File metadata and controls

56 lines (39 loc) · 1.39 KB

HoopDB

HoopDB is a NoSQL database model made in node with no dependencies

Full documentation can be found here

Getting started

$ mkdir my_awesome_project && cd my_awesome_project
$ mkdir db
$ npm install hoopdb

if you want to use it in other languages or maybe use an API: one is avaliable here

Create a .js file for exemple index.js

index.js
const Hoop = require('hoopdb')
const path = require('path')

let db = new Hoop(path.join(__dirname, "db"))

async function main()
{
    await db.connect("token")
    let table = await db.getTable('hello')

    table.createLinePrimary({ name: "naoufel", email: "[email protected]", age: 19 })
    
    console.log(table.getData())
    
    table.updateLines({ name: "naoufel"}, { age: 20 })
    
    console.log(table.getData())
}

main()
.catch(error => console.error(error))
.finally(() => { db.close() })

Notes

This project has been made in 4 hours (if we take out launch time and writing this readme).
It may be obvious but don't use that database model in production.
If there is any issue, notice me on the issue section, by mail at [email protected] or by discord Nowlow#4428.

Licence

MIT