UNPKG

simple-auth-cli

Version:

An implementation of authentication system supporting multiple providers ready to be used with a single command.

11 lines (9 loc) 340 B
import mongoose from "mongoose"; export const connectDB = async () => { try { const connectionInstance = await mongoose.connect(`${process.env.MONGODB_URI}/users`) console.log(`\n MongoDB connected !! DB HOST: ${connectionInstance.connection.host}`); } catch (error) { console.error(error); } }