mirror of
https://gitlab.com/little-lines/backend.git
synced 2025-07-07 14:51:06 +00:00
login logout
This commit is contained in:
parent
24e7aa1ad0
commit
f1f614d4e7
6 changed files with 207 additions and 0 deletions
|
@ -0,0 +1,13 @@
|
|||
const mongoose = require('mongoose');
|
||||
|
||||
const connectDb = async () => {
|
||||
await mongoose.connect(process.env.CONNECTION_STRING, {
|
||||
}).then(() => {
|
||||
console.log("Database connected: ", mongoose.connection.host, mongoose.connection.name);
|
||||
}).catch((err) => {
|
||||
console.log(err);
|
||||
process.exit(1);
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = connectDb;
|
Loading…
Add table
Add a link
Reference in a new issue