updated today.js

This commit is contained in:
martind2000 2016-02-14 15:01:10 +00:00
parent 8a7101a029
commit 043068b407
2 changed files with 24 additions and 40 deletions

View File

@ -18,38 +18,6 @@
env_production : {
NODE_ENV: "production"
}
},
// Second application
{
name : "WEB",
script : "web.js"
}
],
/**
* Deployment section
* http://pm2.keymetrics.io/docs/usage/deployment/
*/
deploy : {
production : {
user : "node",
host : "212.83.163.1",
ref : "origin/master",
repo : "git@github.com:repo.git",
path : "/var/www/production",
"post-deploy" : "npm install ; pm2 startOrRestart ecosystem.json --env production"
},
dev : {
user : "node",
host : "212.83.163.1",
ref : "origin/master",
repo : "git@github.com:repo.git",
path : "/var/www/development",
"post-deploy" : "npm install ; pm2 startOrRestart ecosystem.json --env dev",
env : {
NODE_ENV: "dev"
}
}
}
]
}

View File

@ -284,7 +284,7 @@ module.exports = {
}
;
function sendEmail() {
function sendEmailV1() {
var now = new Date();
@ -299,13 +299,13 @@ function sendEmail() {
logger.debug(__dirname.substr(__dirname.lastIndexOf('/'), __dirname.length));
//if (__dirname.substr(__dirname.lastIndexOf('/'),__dirname.length))
/* mailer.sendTemplate(email, template, function (err) {
if (err) throw err;
console.log('compiled template email sent');
});*/
/* mailer.sendTemplate(email, template, function (err) {
if (err) throw err;
console.log('compiled template email sent');
});*/
mailer.sendText(email, 'Look at this fantastic email body!', function(err){
if(err) throw err;
mailer.sendText(email, 'Look at this fantastic email body!', function (err) {
if (err) throw err;
console.log('email sent!');
});
@ -317,6 +317,22 @@ function sendEmail() {
}
function sendEmail() {
logger.info('Simple email');
var now = new Date();
var email = {
to: 'martind2000@gmail.com',
subject: 'Today - ' + dateFormat(now, "dddd, mmmm dS, yyyy")
};
mailer.sendText(email, 'Look at this fantastic email body!', function (err) {
if (err) throw err;
console.log('email sent!');
});
}
setTimeout(function () {
// console.log('Pre loading trains...');
module.exports.preLoadToday();