
Security News
GitHub Actions Checkout Now Blocks Risky pull_request_target Checkouts
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.
beanify-mongoose
Advanced tools
beanify操作mongodb插件
npm i beanify-mongoose --save
with yarn
yarn add beanify-mongoose
const Beanify = require('beanify')
const mongoose = require('beanify-mongoose')
const beanify = Beanify({})
beanify
.register(mongoose, {
uri: 'mongodb://127.0.0.1:27017/test?readPreference=primary&appname=MongoDB%20Compass&ssl=false',
models: [
{
name: 'test',
alias: 'Test',
schema: {
test: {
type: 'String'
}
}
}
]
})
.ready(e => {
e && beanify.$log.error(e.message)
beanify.print()
await beanify.mongoose.Test.deleteMany()
await beanify.mongoose.Test.create({
test: 'this is test'
})
const doc = await beanify.mongoose.Test.findOne()
console.log(doc.test) // this is test
})
| 字段 | 类型 | 描述 |
|---|---|---|
uri | string | mongoDB服务地址 |
models? | [object] | 数据模型列表 |
useNameAndAlias? | boolean | 是否启用模型别名 |
settings? | mongoose | mongoose库的配置参数 |
FAQs
beanify操作mongodb插件
The npm package beanify-mongoose receives a total of 16 weekly downloads. As such, beanify-mongoose popularity was classified as not popular.
We found that beanify-mongoose demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.