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.

22 lines
469 B

  1. /**
  2. Includes.js
  3. File used for getting the header and footer
  4. */
  5. const utils = require('../utils/utils.js');
  6. const HEADER_FILE = "includes/header.html";
  7. const FOOTER_FILE = "includes/footer.html";
  8. module.exports =
  9. {
  10. printHeader: function(res)
  11. {
  12. res.writeHead(200, {'Content-Type': 'text/html'});
  13. utils.include(res, HEADER_FILE);
  14. },
  15. printFooter: function(res)
  16. {
  17. utils.include(res, FOOTER_FILE);
  18. res.end();
  19. }
  20. };