forked from Techie-Qabila/fastify-mongoose
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update README.md to show an example with Typescript FIXES Techie-Qabila#8
- Loading branch information
Showing
2 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { FastifyPlugin } from 'fastify'; | ||
import { ConnectOptions } from 'mongoose'; | ||
|
||
export interface FastifyMongooseOptions extends ConnectOptions { | ||
/** | ||
* Connection string to your MongoDB instance | ||
*/ | ||
uri: string; | ||
/** | ||
* Name of the plugin, default: mongo | ||
*/ | ||
name?: string; | ||
} | ||
|
||
export const fastifyMongoose: FastifyPlugin<FastifyMongooseOptions>; | ||
export default fastifyMongoose; |