cxx
cxx
DDeno
Created by cxx on 9/28/2023 in #help
Oak: Remove HTML extensions when serving files
Using Oak, how can I serve home.html as /home (or /home/). I'm aware that Context#send exists but I'm not sure if it'll work with my use case. Thanks in advance!
3 replies
DDeno
Created by cxx on 2/24/2023 in #help
Error connecting to MongoDB Atlas
Hello, I'm trying to connect to MongoDB Atlas via mongoose (npm:mongoose) but encountered the following error:
error: Uncaught MongoAPIError: Server record does not share hostname with parent URI
at resolveSRVRecord (file:///home/farish/.cache/deno/npm/registry.npmjs.org/mongodb/4.14.0/lib/connection_string.js:63:19)
at async file:///home/farish/.cache/deno/npm/registry.npmjs.org/mongodb/4.14.0/lib/mongo_client.js:123:31
error: Uncaught MongoAPIError: Server record does not share hostname with parent URI
at resolveSRVRecord (file:///home/farish/.cache/deno/npm/registry.npmjs.org/mongodb/4.14.0/lib/connection_string.js:63:19)
at async file:///home/farish/.cache/deno/npm/registry.npmjs.org/mongodb/4.14.0/lib/mongo_client.js:123:31
My code:
import mongoose from 'npm:mongoose';

await mongoose.connect(
'mongodb+srv://user:pass@main.pj9zc0r.mongodb.net/?retryWrites=true&w=majority',
);
import mongoose from 'npm:mongoose';

await mongoose.connect(
'mongodb+srv://user:pass@main.pj9zc0r.mongodb.net/?retryWrites=true&w=majority',
);
16 replies
DDeno
Created by cxx on 12/20/2022 in #help
Remove trailing commas
Using the deno.json feature, how can I remove trailing commas? I can't find anything related to that under the fmt option. Thanks in advance!
2 replies