const express = require("express");
const favicon = require("express-favicon");

const app = express();
const port = process.env.PORT || 3000;

app.use(express.static("public"));

app.use(favicon(__dirname + "/public/favicon.ico"));

app.get("/", (req, res) => {
  res.sendFile(__dirname + "/index.html");
});

app.get("/index.html", (req, res) => {
  res.redirect("/");
});

app.listen(port, () => {
  console.log(`App listening at localhost:${port}`);
});
