Closed arily closed 4 years ago
Is your feature request related to a problem? Please describe.
比起分别输入host user pass和database 直接给connection string更快 (而且现行版本如果用mongodb+srv protocol 还会报错 Ports not accepted with 'mongodb+srv' URIs) Describe the solution you'd like
config中提供connection string
{ uri: 'mongodb+srv://<user>:<password>@<host>/<database>?retryWrites=true&w=majority' }
Describe alternatives you've considered
没想出来。 Additional context
@undefined-moe 你看着办(
https://github.com/koishijs/koishi/pull/119 👀
config支持使用protocol项。 connection string计划支持。
是这样 如果用'mongodb+srv' 的话 connection string是不能有 port的 但是在index.js里port被赋予默认值,而且拼接connection string的时候会无论如何带上冒号。 需要config.port = undefined
Is your feature request related to a problem? Please describe.
比起分别输入host user pass和database 直接给connection string更快 (而且现行版本如果用mongodb+srv protocol 还会报错 Ports not accepted with 'mongodb+srv' URIs) Describe the solution you'd like
config中提供connection string
Describe alternatives you've considered
没想出来。 Additional context