Personal blog written from scratch using Node.js, Bootstrap, and MySQL. https://jrtechs.net
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

25 lines
528 B

/**
Includes.js
File used for getting the header and footer
*/
const utils = require('./utils.js');
const HEADER_FILE = "includes/header.html";
const FOOTER_FILE = "includes/footer.html";
module.exports =
{
printHeader: function(res)
{
res.writeHead(200, {'Content-Type': 'text/html'});
utils.include(res, HEADER_FILE);
//res.write("Header<br>");
},
printFooter: function(res)
{
//res.write("footer");
utils.include(res, FOOTER_FILE);
res.end();
}
};