require mongoose.
connect to mongodb.