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.

18 lines
354 B

  1. const fs = require('fs');
  2. const sql = require('../utils/sql');
  3. var stream = fs.createWriteStream("../sitemap.txt");
  4. stream.once('open', function(fd)
  5. {
  6. sql.getSiteMap().then(function(result)
  7. {
  8. stream.write(result);
  9. }).then(function()
  10. {
  11. stream.end();
  12. }).catch(function(err)
  13. {
  14. console.log(err);
  15. });
  16. });