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.

24 lines
505 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. return 0;
  15. },
  16. printFooter: function(res)
  17. {
  18. utils.include(res, FOOTER_FILE);
  19. res.end();
  20. return 0;
  21. }
  22. };