Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/agustinsrg/tsbean-driver-mongo

Mongo DB driver for TSBean-ORM
https://github.com/agustinsrg/tsbean-driver-mongo

mongo mongodb orm tsbean-orm

Last synced: about 1 month ago
JSON representation

Mongo DB driver for TSBean-ORM

Awesome Lists containing this project

README

        

# TSBean-ORM MongoDB Driver

[![npm version](https://badge.fury.io/js/tsbean-driver-mongo.svg)](https://badge.fury.io/js/tsbean-driver-mongo)

This a MongoDB driver for [tsbean-orm](https://github.com/AgustinSRG/tsbean-orm).

Based on [mongodb](https://www.npmjs.com/package/mongodb) package.

## Installation

```
npm install --save tsbean-driver-mongo
```

## Usage

```ts
import { DataSourceDriver, DataSource } from "tsbean-orm";
import { MongoDriver } from "tsbean-driver-mongo"

const mySource = MongoDriver.createDataSource("mongodb://localhost/my_database");

DataSource.set(DataSource.DEFAULT, mySource);
```