Add support for connecting to MongoDB Atlas

This commit is contained in:
Aelita4 2024-09-23 13:05:11 +02:00
parent 2e8230ee60
commit 503e8e34dd
Signed by: Aelita4
GPG Key ID: E44490C2025906C1
2 changed files with 4 additions and 1 deletions

1
.gitignore vendored
View File

@ -17,6 +17,7 @@ pnpm-debug.log*
.env
.env.production
config.json
certs/
# macOS-specific files
.DS_Store

View File

@ -2,7 +2,9 @@ import { MongoClient } from "mongodb";
import config from '../../../config.json'
const uri = config.MONGODB_URI;
const options = {};
const options = {
tlsCertificateKeyFile: config.MONGODB_CERT
};
const mongo = new MongoClient(uri, options);