Issue with MongoDB/Mongoose dependencies.
Unanswered
Akai posted this in #help-forum
Original message was deleted.
1 Reply
![Avatar](https://cdn.discordapp.com/avatars/747403406154399765/a_c0b0d5bda193e3b6ecf64682f7aeadde.gif?size=256)
Akai
this is my db,ts
import mongoose from "mongoose";
const connectToMongo = async (): Promise<void> => {
if (mongoose.connection.readyState >= 1) return;
await mongoose.connect(process.env.MONGO_URI as string);
};
export default connectToMongo;