home.js 772 Bytes
Newer Older
Athanasios's avatar
Athanasios committed
1
2
const express = require("express");
const pug = require("pug");
Athanasios's avatar
Athanasios committed
3
4
const config = require("../config");

Athanasios's avatar
Athanasios committed
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

let router = express.Router();

router.route("/")
  .get((req, res) => {

    let art = `
      \\_/       .:"    .:"    .:"
    -=(_)=-  /\\||   /\\||   /\\||
      / \\   //\\\\|  //\\\\|  //\\\\|
           //  \\\\ //  \\\\ //  \\\\
          //    \\^/    \\^/    \\\\
          |[]  []|[]  []|[]  []|
         &|  ||  %  ||  |  ||  |%
      &%&--==--&%-==--%&"""""%&%""""
`;

    const compiledFunction = pug.compileFile("./views/home.pug");
Athanasios's avatar
Athanasios committed
23
24
25
26
    let home = compiledFunction({
      art: art,
      url: config.repository.url
    });
Athanasios's avatar
Athanasios committed
27
28
29
30
31
32
    res.set("Content-Type", "text/html");
    res.send(home);
    
  }); 

module.exports = router;