Issue with MongoDB/Mongoose dependencies.
Unanswered
Vaux's Swift posted this in #help-forum
Original message was deleted.
1 Reply
![Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
Vaux's Swift
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;