【发布时间】:2020-07-13 22:04:26
【问题描述】:
我不知道在完成查询后如何关闭连接
mongoose.connect("mongodb://localhost:27017/Settings", {
useNewUrlParser: true,
useUnifiedTopology: true,
useCreateIndex: true
});
SettingsModel.create({ guildID: guild.id } as Settings, (err: string, res: any) => {
if (err) return console.error(err);
console.log(res);
});
【问题讨论】: