Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wbhob/nest-mongo
MongoDB wrapper for Nest
https://github.com/wbhob/nest-mongo
Last synced: 8 days ago
JSON representation
MongoDB wrapper for Nest
- Host: GitHub
- URL: https://github.com/wbhob/nest-mongo
- Owner: wbhob
- License: mit
- Created: 2017-11-26T02:11:08.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-21T21:21:36.000Z (about 7 years ago)
- Last Synced: 2024-04-24T14:58:23.006Z (10 months ago)
- Language: TypeScript
- Size: 117 KB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# nest-mongo
Hello, there. It looks like you found `nest-mongo`! README will give you some details on usage.### Installation
`nest-mongo` is available from NPM as `nest-mongo`.```sh
$ npm install --save nest-mongo
```And literally that's it. You did an NPM install.
### Configuration
First, import `MongoModule` from `nest-mongo`. Then, call `forRoot()` with your configuration.```ts
import { MongoModule } from 'nest-mongo';@Module({
modules: [
...
MongoModule.forRoot('mongodb://your-mdb-url', {/* optional config */})
...
]
})
```Now, in your components or controllers, import the `Mongo` component and use it like you would the `Db` object in MongoDB driver.