text: const express = require("express");
  const mongoose = require("mongoose");
  const app = express();
  const PORT = process.env.PORT || 3001;
  
  app.use(express.json());
  app.use(express.urlencoded({ extended: true }));
  app.use(express.static("public"));
  
  mongoose.connect(
    process.env.MONGODB_URI || "mongodb://localhost:27017/social-media-2022",
    {
      // useFindAndModify: false,
      useNewUrlParser: true,
      useUnifiedTopology: true,
    }
  );
  
  // Use this to log mongo queries being executed!
  mongoose.set("debug", true);
  
  app.use(require("./routes"));
  // app.use(require("./"));
  
  app.listen(PORT, () =>
    console.log(`🌍 Successfully connected to localhost on port:${PORT}`)
  );
  