var renderPage = function(result, requestURL)
{
return new Promise(function(resolve, reject)
{
result.write("
");
});
};
module.exports=
{
/**
* Displays a page and sidebar to users
*
* @param res
* @param fileName request url
*/
main: function(res, requestURL, request)
{
console.log("posts page");
return new Promise(function(resolve, reject)
{
renderPage(res, requestURL).then(function()
{
return require("../sidebar/sidebar.js").main(res)
}).then(function ()
{
resolve();
});
});
}
};