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.

28 lines
884 B

  1. const utils = require('../utils/utils.js');
  2. var Promise = require('promise');
  3. module.exports=
  4. {
  5. main: function(res)
  6. {
  7. return new Promise(function(resolve, reject)
  8. {
  9. res.write("<div class=\"w3-col l4\">");
  10. utils.include(res,"sidebar/sidebar.html").then(function()
  11. {
  12. return require("../sidebar/recentPosts.js").main(res);
  13. }).then(function()
  14. {
  15. return require("../sidebar/categoriesSideBar.js").main(res);
  16. }).then(function()
  17. {
  18. res.write("</div>");
  19. resolve();
  20. }).catch(function(err)
  21. {
  22. console.log("hit error");
  23. console.log(err);
  24. })
  25. })
  26. }
  27. };