mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
core: fix database connection
This commit is contained in:
1 parent
551cf9c19f
commit
2b6986bd58
4 files changed
+4
-4
No files matched your search
@@ -23,7 +23,7 @@ if (!cluster.isMaster) {
|
||||
|
||||
if (argv._[0] === 'db') {
|
||||
function buildUrl(opts) {
|
||||
let mongourl = `${opts.protocol}://`;
|
||||
let mongourl = `${opts.protocol || 'mongodb'}://`;
|
||||
if (opts.username) mongourl += `${opts.username}:${opts.password}@`;
|
||||
mongourl += `${opts.host}:${opts.port}/${opts.name}`;
|
||||
if (opts.url) mongourl = opts.url;
|
||||
|
||||
Reference in new issue
Block a user