25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

15 lines
291 B

  1. const mongoose = require("mongoose");
  2. const mongoConnection = () => {
  3. mongoose
  4. .connect(process.env.mongo_url)
  5. .then(() => {
  6. console.log("Mongo DB connected");
  7. })
  8. .catch((err) => {
  9. console.log("Error connecting");
  10. });
  11. };
  12. module.exports = mongoConnection;