Spaces:
Runtime error
Runtime error
Download src/config/db.js from yeshwanth-kr/dss-server: direct link, hf CLI and curl.
- Browser
- Download file 288 Bytes
-
https://huggingface.co/spaces/yeshwanth-kr/dss-server/resolve/main/src/config/db.js
- Command line
-
hf download hf://spaces/yeshwanth-kr/dss-server/src/config/db.js
-
curl -L -o db.js https://huggingface.co/spaces/yeshwanth-kr/dss-server/resolve/main/src/config/db.js
288 Bytes
| const mongoose = require('mongoose'); | |
| const env = require('./env'); | |
| mongoose.set('strictQuery', true); | |
| async function connectDb() { | |
| await mongoose.connect(env.mongoUri, { | |
| dbName: env.mongoDbName | |
| }); | |
| return mongoose.connection; | |
| } | |
| module.exports = { | |
| mongoose, | |
| connectDb | |
| }; | |