first commit
This commit is contained in:
Vendored
+16
@@ -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;
|
||||
Reference in New Issue
Block a user