text: const express = require("express");
  const exphbs = require("express-handlebars");
  const handlebars = require("handlebars");
  const {
    allowInsecurePrototypeAccess,
  } = require("@handlebars/allow-prototype-access");
  const app = express();
  const db = require("./models");
  const SongsController = require("./controllers/songsController");
  
  const PORT = process.env.PORT || 8080;
  
  app.use(express.urlencoded({ extended: true }));
  app.use(express.json());
  app.use(express.static("public"));
  
  app.engine(
    "handlebars",
    exphbs({
      defaultLayout: "main",
      handlebars: allowInsecurePrototypeAccess(handlebars),
    })
  );
  app.set("view engine", "handlebars");
  
  
  
  app.get("/api/config", (req, res) => {
    res.json({
      success: true,
    });
  });
  
  app.use(SongsController);
  
  db.sequelize
    .sync()
    .then(() => {
      app.listen(PORT, () => {
        console.log(`Server is running on http://localhost:${PORT}`);
      });
    })
    .catch((err) => {
      console.log(err);
    });
  