mirror of
https://gitlab.silvrtree.co.uk/martind2000/old-silvrgit.git
synced 2025-01-10 21:45:08 +00:00
updated today.js
This commit is contained in:
parent
8a7101a029
commit
043068b407
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
30
lib/today.js
30
lib/today.js
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user