first commit

This commit is contained in:
2024-03-05 19:20:15 +05:00
commit 9167785656
17 changed files with 2182 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const mongoose_1 = require("mongoose");
async function connectDB() {
try {
await (0, mongoose_1.connect)(process.env.MONGO_URI, { dbName: "pixel_streaming2" });
console.log("MongoDB connected...");
}
catch (error) {
if (error instanceof Error) {
console.error(error.message);
}
process.exit(1);
}
}
exports.default = connectDB;