const express = require("express");
const fs = require("fs");
const path = require("path");
const router = express.Router();

router.get("/", (req, res) => {
    res.send(
        fs.readFileSync(path.join(__dirname, "pages/index.html")).toString("utf-8")
    );
});

router.get("/connect", (req, res) => {
    res.send(
        fs.readFileSync(path.join(__dirname, "pages/connect.html")).toString("utf-8")
    );
});

router.get("/*", (req, res) => res.status(404).send("<p><b>404:</b> Not finded.</p>"));

module.exports = router;
