Bridge-Mongo
A fully typed mongodb ORM, based on mongoose. The project is under active development.
What is Bridge-Mongo?
Bridge-Mongo is meant to be a type-safe ORM built on top of Mongoose. The main focus is to provide a synthax as close as possible to mongoose, while providing full type-safety and auto-completion throughout all operations.
Development
To follow the development or contribute, join the Discord server.
Contributing
If you want any guidance whatsoever with the contribution, don't hesitate to reach out on Discord!
Installation
You can use your favorite package manager to install Bridge-Mongo.
npm i bridge-mongo
Example
import { isError, Schema, mongoose, createDB } from "bridge-mongo"
const user = new Schema({
name: { type: String, required: true },
email: { type: String, required: true },
age: Number,
additionnalInformation: {
likeAnimals: Boolean
}
}, {
timestamps: true
})
const DB = createDB({
user
})
async () => {
const newUser = await DB.user.create({
email: "dave@bridge.codes",
name: "Dave"
})
}