🐛 mongodb async, fixes #273
This commit is contained in:
parent
5e6e8b3823
commit
13727465fa
1 changed files with 1 additions and 1 deletions
|
@ -8,7 +8,7 @@ import logger from "@logger";
|
|||
import { url } from "@config/database";
|
||||
|
||||
export default async () => {
|
||||
mongoose.connect(url).then(async (connection) => {
|
||||
await mongoose.connect(url).then(async (connection) => {
|
||||
logger?.info(`Connected to database: ${connection.connection.name}`);
|
||||
});
|
||||
mongoose.connection.on("error", (error) => {
|
||||
|
|
Loading…
Add table
Reference in a new issue