move mongoose.connect() into server.js