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.

31 lines
791 B

  1. var renderPage = function(result, requestURL)
  2. {
  3. return new Promise(function(resolve, reject)
  4. {
  5. result.write("<div class=\"w3-col l8 s12\">");
  6. });
  7. };
  8. module.exports=
  9. {
  10. /**
  11. * Displays a page and sidebar to users
  12. *
  13. * @param res
  14. * @param fileName request url
  15. */
  16. main: function(res, requestURL, request)
  17. {
  18. console.log("posts page");
  19. return new Promise(function(resolve, reject)
  20. {
  21. renderPage(res, requestURL).then(function()
  22. {
  23. return require("../sidebar/sidebar.js").main(res)
  24. }).then(function ()
  25. {
  26. resolve();
  27. });
  28. });
  29. }
  30. };