let express = require("express");
let morgan = require("morgan");
let indexRoute = require("./routes/index");
let checkMail = require("./routes/checkMail");
let notFoundRoute = require("./routes/notFound");
let errorRoute = require("./routes/error");
let app = express();
app.use(morgan("dev"))
.use(express.static("public"))
.set("view engine", "pug")
.use("/", indexRoute)
.use("/checkmail", checkMail)
.use(notFoundRoute)
.use(errorRoute)
.listen(process.env.PORT || 8080);