text: const express = require("express");
  const mongoose = require("mongoose");
  const keys = require("./config/keys");
  const passport = require("passport");
  const cookieSession = require("cookie-session");
  
  require("./models/User");
  require("./services/passport");
  
  mongoose.connect(
    keys.mongoURI,
    { useNewUrlParser: true }
  );
  
  const app = express();
  
  app.use(
    cookieSession({
      maxAge: 30 * 24 * 60 * 60 * 1000,
      keys: [keys.cookieKey]
    })
  );
  
  app.use(passport.initialize());
  app.use(passport.session());
  
  require("./routes/authRoutes")(app);
  
  const PORT = process.env.PORT || 8000;
  
  app.listen(PORT, () => {
    console.log("Listening on port 8000...");
  });
  