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.
 
 

23 lines
538 B

var Promise = require('promise');
const sql = require('../utils/sql');
module.exports=
{
main: function(res, fileName)
{
return new Promise(function(resolve, reject)
{
sql.getCategories().then(function(categories)
{
console.log(categories);
for(var category in categories)
{
res.write(category);
}
}).then(function())
{
resolve();
}
});
}
};