Skip to content

Instantly share code, notes, and snippets.

@inneroot
Created June 12, 2020 11:03
Show Gist options
  • Save inneroot/50d9fc001516d0552fe7baa04c2e996f to your computer and use it in GitHub Desktop.
Save inneroot/50d9fc001516d0552fe7baa04c2e996f to your computer and use it in GitHub Desktop.
require('dotenv/config')
const mongoose = require('mongoose')
const Mymodel = require('./models/Mymodel')
mongoose.connect(
process.env.MONGOCONNECT,
{useNewUrlParser: true,
useUnifiedTopology: true},
() => console.log('connected to mongo')
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment