text: const express = require('express');
  // const mongoose = require('mongoose');
  const mongoose = require('./config/connection');
  const app = express();
  const PORT = process.env.PORT || 3001;
  
  app.use(express.json());
  app.use(express.urlencoded({ extended: true }));
  app.use(express.static('public'));
  
  app.use(require('./routes'));
  
  mongoose.once('open', () => {
    app.listen(PORT, () => {console.log(`🌍 Connected on localhost:${PORT}`)})
  })
  
  