ahmed349
ahmed349
DDeno
Created by ahmed349 on 11/22/2024 in #help
cant connect to mongo atlas via official driver or mongoose but works outside of deno
I am not sure how this relates to the issue at hand, could you clarify
3 replies
DDeno
Created by ahmed349 on 11/22/2024 in #help
cant connect to mongo atlas via official driver or mongoose but works outside of deno
import mongoose from "npm:mongoose";

const uri = 'mongodb+srv://no:u@no.u.mongodb.net/?retryWrites=true&w=majority&appName=Cluster0'

async function run() {
await mongoose.connect(uri, {dbName: "sample_mflix"});
}

run().catch(console.dir);
import mongoose from "npm:mongoose";

const uri = 'mongodb+srv://no:u@no.u.mongodb.net/?retryWrites=true&w=majority&appName=Cluster0'

async function run() {
await mongoose.connect(uri, {dbName: "sample_mflix"});
}

run().catch(console.dir);
code used by mongoose
3 replies