https://github.com/nbalduzzi/fastify-mongo-memory
Fastify Mongo in memory Plugin
https://github.com/nbalduzzi/fastify-mongo-memory
Last synced: 5 months ago
JSON representation
Fastify Mongo in memory Plugin
- Host: GitHub
- URL: https://github.com/nbalduzzi/fastify-mongo-memory
- Owner: nbalduzzi
- License: mit
- Created: 2017-12-01T10:19:35.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-16T00:05:54.000Z (over 2 years ago)
- Last Synced: 2024-08-20T06:01:07.424Z (8 months ago)
- Language: JavaScript
- Homepage:
- Size: 683 KB
- Stars: 7
- Watchers: 2
- Forks: 1
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-fastify - `fastify-mongo-memory`
README
# Fastify Mongo Memory Plugin


[](https://standardjs.com)
[](https://github.com/semantic-release/semantic-release)[](https://nodei.co/npm/fastify-mongo-memory/)
## Installation
```bash
npm install fastify-mongo-memory --save
```## Usage
```javascript
fastify.register(require('fastify-mongo-memory'), options, err => console.error(err));fastify.get('/', (request, reply) => {
console.log(fastify.mongo); // Mongo in memory DB
});
```## Options
Mongo in memory DB configuration JSON object.
```json
{
"port": 5000 /* 8000 by default */
"dbname": "database-test-name"
}
```## Author
[Nicolás Balduzzi]([email protected])
## License
Licensed under [MIT](./LICENSE).