固定插件猫鼬
安装
npm install fastify-plugin-mongoose
用法
初始化
const fastify = require ( "fastify" ) ( ) ;
const fastifyPluginMongoose = require ( "fastify-plugin-mongoose" ) ;
const path = require ( "path" ) ;
fastify . register ( fastifyPluginMongoose , {
uri : "mongodb://localhost:27017/dbName" ,
settings : {
// https://mongoosejs.com/docs/connections.html#options
// these are default
useNewUrlPa
评论0
最新资源