core: db: prefer connection uri

This commit is contained in:
undefined committed 2022-12-10 04:41:49 +08:00
1 parent c5ad6599a8
commit 6d69e88739
2 files changed
+9 -7

No files matched your search

+1 -5
View File
@@ -336,11 +336,7 @@ connect-timeout = 10`);
})})`),
[`mongo 127.0.0.1:27017/hydro ${tmpFile}`, { retry: true }],
() => writeFileSync(`${process.env.HOME}/.hydro/config.json`, JSON.stringify({
host: '127.0.0.1',
port: 27017,
name: 'hydro',
username: 'hydro',
password,
uri: `mongodb://hydro:${password}@127.0.0.1:27017/hydro`,
})),
'pm2 stop mongod',
'pm2 del mongod',