text: const express = require("express");
  const cors = require("cors");
  const bodyParser = require("body-parser");
  const mysql = require("mysql");
  const bearerToken = require("express-bearer-token");
  const events = require("./events");
  const oktaAuth = require("./auth");
  
  const connection = mysql.createConnection({
    port: 3306,
    host: "m7nj9dclezfq7ax1.cbetxkdyhwsb.us-east-1.rds.amazonaws.com",
    user: "ci6x184naqtb2so7",
    password: "k85ihpgsneu16rpj",
    database: "lcuqs5ux986qociq",
  });
  
  if (process.env.JAWSDB_URL) {
    // Database is JawsDB on Heroku
    connection = mysql.createConnection(process.env.JAWSDB_URL);
  }
  
  connection.connect();
  
  const port = process.env.PORT || 8080;
  
  const app = express()
    .use(cors())
    .use(bodyParser.json())
    .use(bearerToken())
    .use(oktaAuth)
    .use(events(connection));
  
  app.listen(port, () => {
    console.log(`Express server listening on port ${port}`);
  });
  