const mongo = require('mongodb').MongoClient;
mongo.connect(process.env.DATABASE,{useUnifiedTopology: true,
useNewUrlParser: true}, (err, db) => {
if(err) {
console.log('Database error: ' + err);
} else {
console.log('Successful database connection');
auth(app, db)
routes(app, db)
app.listen(process.env.PORT || 3000, () => {
console.log("Listening on port " + process.env.PORT);
});
}});