diff --git a/dev.sh b/dev.sh index 95684afa7..1047788fb 100755 --- a/dev.sh +++ b/dev.sh @@ -12,11 +12,12 @@ case "$1" in start|"") $0 stop echo "Starting nginx." - "$nginxBin" -c "$nginxConf" -p "$nginxPrefix" + mkdir -p "$nginxPrefix/temp" + "$nginxBin" -c "$nginxConf" -p "$nginxPrefix" 2>> /dev/null ;; stop) echo "Stoping nginx." - "$nginxBin" -c "$nginxConf" -p "$nginxPrefix" -s stop + "$nginxBin" -c "$nginxConf" -p "$nginxPrefix" -s stop 2>> /dev/null ;; *) echo "Usage: `basename "$0"` [start|stop]" diff --git a/services/mailer/application/config/app.json b/services/mailer/application/config/app.json new file mode 100644 index 000000000..72df39173 --- /dev/null +++ b/services/mailer/application/config/app.json @@ -0,0 +1,9 @@ +{ + "name": "MailServer", + "version": "1.0.0", + "port": 3003, + "debug": true, + "defaultLanguage": "es", + "senderMail": "noreply@localhost", + "senderName": "" +} \ No newline at end of file diff --git a/services/mailer/application/config/mysql.json b/services/mailer/application/config/mysql.json new file mode 100644 index 000000000..ddfd88bed --- /dev/null +++ b/services/mailer/application/config/mysql.json @@ -0,0 +1,7 @@ +{ + "host": "localhost", + "port": 3306, + "user": "reports", + "password": "", + "database": "" +} \ No newline at end of file diff --git a/services/mailer/application/config/smtp.json b/services/mailer/application/config/smtp.json new file mode 100644 index 000000000..a6579d067 --- /dev/null +++ b/services/mailer/application/config/smtp.json @@ -0,0 +1,9 @@ +{ + "host": "localhost", + "port": 465, + "secure": true, + "auth": { + "user": "noreply", + "pass": "" + } +} \ No newline at end of file diff --git a/services/mailer/Application/database.js b/services/mailer/application/database.js similarity index 100% rename from services/mailer/Application/database.js rename to services/mailer/application/database.js diff --git a/services/mailer/Application/language.js b/services/mailer/application/language.js similarity index 100% rename from services/mailer/Application/language.js rename to services/mailer/application/language.js diff --git a/services/mailer/Application/Language/es.paymentUpdate.json b/services/mailer/application/language/es.paymentUpdate.json similarity index 100% rename from services/mailer/Application/Language/es.paymentUpdate.json rename to services/mailer/application/language/es.paymentUpdate.json diff --git a/services/mailer/Application/mail.js b/services/mailer/application/mail.js similarity index 100% rename from services/mailer/Application/mail.js rename to services/mailer/application/mail.js diff --git a/services/mailer/Application/Route/manuscript.js b/services/mailer/application/route/manuscript.js similarity index 100% rename from services/mailer/Application/Route/manuscript.js rename to services/mailer/application/route/manuscript.js diff --git a/services/mailer/Application/Route/notification.js b/services/mailer/application/route/notification.js similarity index 100% rename from services/mailer/Application/Route/notification.js rename to services/mailer/application/route/notification.js diff --git a/services/mailer/Application/router.js b/services/mailer/application/router.js similarity index 100% rename from services/mailer/Application/router.js rename to services/mailer/application/router.js diff --git a/services/mailer/Application/settings.js b/services/mailer/application/settings.js similarity index 100% rename from services/mailer/Application/settings.js rename to services/mailer/application/settings.js diff --git a/services/mailer/Application/template.js b/services/mailer/application/template.js similarity index 100% rename from services/mailer/Application/template.js rename to services/mailer/application/template.js diff --git a/services/mailer/Application/Template/images/arrow.png b/services/mailer/application/template/images/arrow.png similarity index 100% rename from services/mailer/Application/Template/images/arrow.png rename to services/mailer/application/template/images/arrow.png diff --git a/services/mailer/Application/Template/images/chat.png b/services/mailer/application/template/images/chat.png similarity index 100% rename from services/mailer/Application/Template/images/chat.png rename to services/mailer/application/template/images/chat.png diff --git a/services/mailer/Application/Template/images/download.png b/services/mailer/application/template/images/download.png similarity index 100% rename from services/mailer/Application/Template/images/download.png rename to services/mailer/application/template/images/download.png diff --git a/services/mailer/Application/Template/images/facebook.png b/services/mailer/application/template/images/facebook.png similarity index 100% rename from services/mailer/Application/Template/images/facebook.png rename to services/mailer/application/template/images/facebook.png diff --git a/services/mailer/Application/Template/images/header.png b/services/mailer/application/template/images/header.png similarity index 100% rename from services/mailer/Application/Template/images/header.png rename to services/mailer/application/template/images/header.png diff --git a/services/mailer/Application/Template/images/instagram.png b/services/mailer/application/template/images/instagram.png similarity index 100% rename from services/mailer/Application/Template/images/instagram.png rename to services/mailer/application/template/images/instagram.png diff --git a/services/mailer/Application/Template/images/linkedin.png b/services/mailer/application/template/images/linkedin.png similarity index 100% rename from services/mailer/Application/Template/images/linkedin.png rename to services/mailer/application/template/images/linkedin.png diff --git a/services/mailer/Application/Template/images/pinterest.png b/services/mailer/application/template/images/pinterest.png similarity index 100% rename from services/mailer/Application/Template/images/pinterest.png rename to services/mailer/application/template/images/pinterest.png diff --git a/services/mailer/Application/Template/images/twitter.png b/services/mailer/application/template/images/twitter.png similarity index 100% rename from services/mailer/Application/Template/images/twitter.png rename to services/mailer/application/template/images/twitter.png diff --git a/services/mailer/Application/Template/images/youtube.png b/services/mailer/application/template/images/youtube.png similarity index 100% rename from services/mailer/Application/Template/images/youtube.png rename to services/mailer/application/template/images/youtube.png diff --git a/services/mailer/Application/Template/paymentUpdate.html b/services/mailer/application/template/paymentUpdate.html similarity index 100% rename from services/mailer/Application/Template/paymentUpdate.html rename to services/mailer/application/template/paymentUpdate.html diff --git a/services/mailer/Application/Util/system.js b/services/mailer/application/util/system.js similarity index 100% rename from services/mailer/Application/Util/system.js rename to services/mailer/application/util/system.js diff --git a/services/mailer/package.json b/services/mailer/package.json index b29408a8f..2cdcf26f1 100644 --- a/services/mailer/package.json +++ b/services/mailer/package.json @@ -1,5 +1,5 @@ { - "name": "MailServer", + "name": "mailer", "version": "0.0.1", "description": "Servidor de envĂ­o de correos", "main": "server.js", diff --git a/services/mailer/server.js b/services/mailer/server.js index 5ee3412e8..f7d5bc571 100644 --- a/services/mailer/server.js +++ b/services/mailer/server.js @@ -4,16 +4,16 @@ var express = require('express'); var app = module.exports = express(); var bodyParser = require('body-parser'); -var settings = require('./Application/settings.js'); -var mail = require('./Application/mail.js'); -var database = require('./Application/database.js'); +var settings = require('./application/settings.js'); +var mail = require('./application/mail.js'); +var database = require('./application/database.js'); // Middleware app.use(bodyParser.json()); app.use(bodyParser.urlencoded({extended: true})); // Cargar rutas -app.use('/', require('./Application/router.js')); +app.use('/', require('./application/router.js')); // Iniciar escucha del servidor app.start = function() {