text: const mongoose = require("mongoose");
  
  const connectUserDB = () => connectDB(process.env.DATABASE_USER_CONNECTION, "USER");
  const connectTodoDB = () => connectDB(process.env.DATABASE_TODO_CONNECTION, "TODO");
  
  const connectDB = async (DATABASE_CONNECTION, TYPE) => {
      try {
          const connection = await mongoose.connect(DATABASE_CONNECTION, {
              useNewUrlParser: true,
              useCreateIndex: true,
              useUnifiedTopology: true
          });
          console.log(TYPE.green.bold + ` Database is connected on: ${connection.connection.host}`.cyan.bold);
      } catch (err) {
          console.log(`Error: ${err.message}`.red);
          process.exit(1);
      }
  };
  
  module.exports = {
      connectUserDB,
      connectTodoDB
  }