Skip to content
This repository has been archived by the owner on Apr 3, 2019. It is now read-only.

Commit

Permalink
changes to make this ready for production (#206) r=vladikoff
Browse files Browse the repository at this point in the history
* fix(logging): dump full config to log at startup

* fix(logging): errors are log.error() level

* fix(l10n): use fxa-shared for list of supported languages
  • Loading branch information
jrgm authored and vladikoff committed Sep 7, 2016
1 parent 96ed6e1 commit ff87f03
Show file tree
Hide file tree
Showing 6 changed files with 101 additions and 73 deletions.
3 changes: 2 additions & 1 deletion bin/server.js
Expand Up @@ -28,7 +28,8 @@ P.all(
.spread(
function (translator, templates) {
var mailer = new Mailer(translator, templates, mailConfig)
log.info('config', mailConfig)
log.info('config', config.getProperties())
log.info('mailConfig', mailConfig)
log.info('templates', Object.keys(templates))

dbConnect()
Expand Down
6 changes: 4 additions & 2 deletions config.js
Expand Up @@ -6,6 +6,7 @@ var fs = require('fs')
var path = require('path')

var convict = require('convict')
var DEFAULT_SUPPORTED_LANGUAGES = require('fxa-shared').l10n.supportedLanguages

var conf = convict({
env: {
Expand Down Expand Up @@ -74,9 +75,10 @@ var conf = convict({
}
},
locales: {
default: ['en', 'de'],
default: DEFAULT_SUPPORTED_LANGUAGES,
doc: 'Available locales',
format: Array
format: Array,
env: 'SUPPORTED_LANGUAGES'
},
defaultLanguage: {
doc: 'Default locale language',
Expand Down
2 changes: 1 addition & 1 deletion lib/verification-reminders.js
Expand Up @@ -39,7 +39,7 @@ module.exports = function (mailer, db, options) {
log.debug('_processReminder', { msg: 'Already Verified' })
}
}, function (err) {
log.debug('_processReminder', { err: err })
log.error('_processReminder', { err: err })
})
},
_continuousPoll: function () {
Expand Down

0 comments on commit ff87f03

Please sign in to comment.