// index.js

/**
* Required External Modules
*/

const express = require("express");
const path = require("path");

/**
* App Variables
*/


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

/**
*  App Configuration
*/

app.set("views", path.join(__dirname, "views"));
app.set("view engine", "pug");
app.use(express.static(path.join(__dirname, "public")));

/**
* Routes Definitions
*/

app.get("/", (req, res) => {
  res.render("index", { title: "Home" });
});
app.get("/who-we-are", (req, res) => {
  res.render("who_we_are", { title: "Who we are" });
});
app.get("/why-choose-us", (req, res) => {
  res.render("why_choose_us", { title: "Why choose us" });
});
app.get("/who-we-serve", (req, res) => {
  res.render("who_we_serve", { title: "Who we serve" });
});
app.get("/milestones", (req, res) => {
  res.render("milestones", { title: "Milestones" });
});
app.get("/about", (req, res) => {
  res.render("about", { title: "About" });
});
app.get("/services", (req, res) => {
  res.render("services", { title: "Services" });
});
app.get("/media", (req, res) => {
  res.render("media", { title: "Media" });
});
app.get("/insights", (req, res) => {
  res.render("insights", { title: "Insights" });
});
app.get("/csr", (req, res) => {
  res.render("csr", { title: "CSR" });
});
app.get("/career", (req, res) => {
  res.render("career", { title: "Career" });
});
app.get("/contact", (req, res) => {
  res.render("contactus", { title: "Contact Us" });
});
app.get("/corporate-overview", (req, res) => {
  res.render("corporate-overview", { title: "Corporate Overview" });
});
app.get("/satutory", (req, res) => {
  res.render("satutory", { title: "Satutory" });
});
app.get("/disclaimer", (req, res) => {
  res.render("disclaimer", { title: "Disclaimer" });
});
app.get("/login", (req, res) => {
  res.render("login", { title: "Login" });
});
app.get("/webcustody", (req, res) => {
  res.render("webcustody", { title: "Webcustody" });
});
app.get("/derivatives", (req, res) => {
  res.render("derivatives", { title: "Derivatives" });
});

/**
* Server Activation
*/

app.listen(port, () => {
  console.log(`Listening to requests on http://localhost:${port}`);
});