Last active
September 9, 2024 18:40
-
-
Save gjohnson/c3d7837f9c39458250d134d3527f7ebf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const mongoose = require('mongoose'); | |
mongoose.connect('mongodb://admin:admin@mongodb:27017/').catch(err => { | |
console.error('Error connecting to MongoDB:', err); | |
}).then(() => { | |
console.log('Connected to MongoDB'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment