🐛 mongodb async, fixes #273

This commit is contained in:
Axel Olausson Holtenäs 2022-05-15 07:37:55 +02:00
parent 5e6e8b3823
commit 13727465fa
No known key found for this signature in database
GPG key ID: 7BF6826B76382CBA

View file

@ -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) => {