aboutsummaryrefslogtreecommitdiff
path: root/src/templates.js
blob: 2c0290550167855753087448d6ac1962a962bdca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
const fs = require('fs');
const path = require('path');
const handlebars = require("handlebars");

function setUpTemplates(){
    let templates = {};
    
    {
        const templateContent = fs.readFileSync(path.join(__dirname, 'templates/login.html')).toString()
        templates["login"] = handlebars.compile(templateContent);
    }
    {
        const templateContent = fs.readFileSync(path.join(__dirname, 'templates/index.html')).toString()
        // templates["index"] = handlebars.compile(templateContent);
    }
    {
        const templateContent = fs.readFileSync(path.join(__dirname, 'templates/summary.html')).toString()
        templates["summary"] = handlebars.compile(templateContent);
    }

    return templates
}


module.exports = {
    setUpTemplates
};