updated today.js

This commit is contained in:
martind2000 2016-02-14 21:41:40 +00:00
parent e6c9afa058
commit 5d0d3ad34a

View File

@ -2,7 +2,7 @@
* Created by marti on 30/01/2016.
*/
var http = require('http'), request = require('request'), cheerio = require('cheerio'), Forecast = require('forecast.io'), util = require('util'), UltraSES = require('ultrases'), cron = require('node-cron');
var jade = require('jade'), _ = require('lodash'), dateFormat = require('dateformat');
var jade = require('jade'), _ = require('lodash');
var jsonfile = require('jsonfile');
var todayCache = {
@ -203,15 +203,12 @@ module.exports = {
;
function sendEmail() {
var now = new Date();
var email = {
to: 'martind2000@gmail.com',
subject: 'Today - ' + dateFormat(now, "dddd, mmmm dS, yyyy")
subject: 'Today'
};
var template = {file: 'lib/jade/today.jade', locals: todayCache};
var template = {file: 'jade/today.jade', locals: todayCache};
mailer.sendTemplate(email, template, function (err) {
if (err) throw err;
console.log('compiled template email sent');