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.

21 lines
386 B

  1. /**
  2. Utilities is a node modules created to make tasks like
  3. including html files easier for me programming.
  4. */
  5. const fs = require('fs');
  6. module.exports=
  7. {
  8. include: function(res, fileName)
  9. {
  10. try
  11. {
  12. res.write(fs.readFileSync(fileName));
  13. }
  14. catch (e)
  15. {
  16. console.log("Could not find " + fileName);
  17. }
  18. }
  19. };