Skip to content

dx-toolkit/nengoose

Repository files navigation

Nengoose

This is a ODM wrapper for nedb.

first-timers-only Open Source Love MIT Licence

Motivation

The goal of this open source project is to create a nedb wrapper like mongoose.

Getting started

Run npm install nengoose into your project

Connecting to the database

First, we need to define a connection. If your app uses only one database, you should import the package. If you need to create additional connections, just create a new variable to contain the connection.

const database = require('nengoose');

const User =  new database("path/to/db");

Defining a schema

To create a database schema we will have to

const User = new database("path/to/db");

const user = User.Schema({
    user: {
        type: String
    },
    password: {
        type: String
    },
    address: {
        type: Array
    }
});

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published