end-to-end CI to match containerization on rest of adipu_server
All checks were successful
Deploy to Server / deploy (push) Successful in 18s
All checks were successful
Deploy to Server / deploy (push) Successful in 18s
This commit is contained in:
4
db.js
4
db.js
@@ -3,7 +3,7 @@ const mongoose = require('mongoose');
|
||||
|
||||
const connectDB = async () => {
|
||||
try {
|
||||
const mongoUri = 'mongodb://localhost:27017/myScheduledApp';
|
||||
const mongoUri = process.env.MONGO_URI || 'mongodb://127.0.0.1:27017/myScheduledApp';
|
||||
await mongoose.connect(mongoUri);
|
||||
console.log('MongoDB connected successfully for Mongoose!');
|
||||
} catch (err) {
|
||||
@@ -12,4 +12,4 @@ const connectDB = async () => {
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = connectDB;
|
||||
module.exports = connectDB;
|
||||
|
||||
Reference in New Issue
Block a user