Comments (4)
需要配置什么参数吗??
from egg-mongo-native.
config.mongo = {
client: {
host: mongo_server_ip,
port: '27017',
name: 'example',
user: 'gitxxxx',
password: '123456',
options: {
useNewUrlParser: true
},
}
};
这样配置,可以直接在agent通过agent.mongo直接使用吗?还是需要通过其他方式调用??
from egg-mongo-native.
不好意思,只能通过 app
操作数据库连接实例。我看了下 agent
中好像是不能访问到 app
,那么就不能使用插件。
p.s. 在 agent
中操作数据库是不建议的。
from egg-mongo-native.
ok,非常感谢。
from egg-mongo-native.
Related Issues (20)
- Error when insertOne new data HOT 3
- [bug] index.d.ts文件不支持多个数据库实例配置 HOT 5
- 如何插入一个ISODate的数据类型 HOT 1
- feature request: support findAndModify HOT 5
- transactions 事务支持 HOT 13
- count 方法已被弃用 HOT 4
- 3.4 版本变更是否引入了不兼容元素? HOT 5
- Please update @types/mongodb to v0.3.19 HOT 5
- 我的项目正在使用你的框架,能不能加个微信让我少点踩坑13902515095 HOT 1
- 不能指定单实例的dababase吗 HOT 1
- TypeScript:TypeError: Cannot read property 'collection' of undefined HOT 1
- 索引过期要怎么传呢 HOT 1
- change_stream不支持吗 HOT 1
- 是不是在 egg 2.15 中使用需要用其他配置选项 HOT 2
- 是否支持聚合查询 HOT 9
- 如何获取ObjectId? HOT 1
- when use insertOne have a error HOT 3
- 你好,我找不到mapReduce这个API,是插件不支持吗 HOT 1
- 你好,获取mongo实例这样是正确的吗 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from egg-mongo-native.