text: const express = require("express");
  const connectDB = require("./config/db");
  const cors = require("cors");
  const morgan = require("morgan");
  
  const app = express();
  
  // Middleware
  app.use(express.json({ extended: false }));
  app.use(express.urlencoded({ extended: false }));
  app.use(cors());
  app.use(morgan("dev"));
  
  //Connect Database
  connectDB();
  
  //Define Routes
  app.use("/api/", require("./routes/api/users"));
  app.use("/api/", require("./routes/api/auth"));
  app.use("/api/admin/students", require("./routes/api/students"));
  app.use("/api/admin/courses", require("./routes/api/courses"));
  
  const PORT = process.env.PORT || 5000;
  
  app.listen(PORT, () => console.log(`Server started on port ${PORT}`));
  