const Promise = require('promise'); const sql = require('../utils/sql'); module.exports= { /** * Responsible for querying the database and displaying all * categories that the blog has in the sidebar * * @param res * @return {*|Promise} */ main: function(res) { return new Promise(function(resolve, reject) { res.write("
"); sql.getCategories().then(function(categories) { console.log(categories[0].name); console.log("cool beans"); // for(var category in categories) // { // console.log(category); // res.write(category.name); // } res.write("
"); resolve(); }) }); } }; /*

Tags

Travel New York London IKEA NORWAY DIY Ideas Baby Family News Clothing Shopping Sports Games

*/