Skip to content
Permalink
Browse files

Re-enable auto reloading of i18n but postponed

  • Loading branch information...
bkimminich committed Nov 6, 2019
1 parent e9c7314 commit 7e751081d1376b3985138723ce033a752f4e17f4
Showing with 8 additions and 8 deletions.
  1. +8 −8 server.js
@@ -86,15 +86,19 @@ const deluxe = require('./routes/deluxe')
const memory = require('./routes/memory')
const locales = require('./data/static/locales')
const i18n = require('i18n')

require('./lib/startup/restoreOverwrittenFilesWithOriginals')()
require('./lib/startup/cleanupFtpFolder')()
require('./lib/startup/validatePreconditions')()
require('./lib/startup/validateConfig')()

const multer = require('multer')
const uploadToMemory = multer({ storage: multer.memoryStorage(), limits: { fileSize: 200000 } })

const mimeTypeMap = {
'image/png': 'png',
'image/jpeg': 'jpg',
'image/jpg': 'jpg'
}

const uploadToDisk = multer({
storage: multer.diskStorage({
destination: (req, file, cb) => {
@@ -118,11 +122,6 @@ const uploadToDisk = multer({

errorhandler.title = `${config.get('application.name')} (Express ${utils.version('express')})`

require('./lib/startup/validatePreconditions')()
require('./lib/startup/validateConfig')()
require('./lib/startup/cleanupFtpFolder')()
require('./lib/startup/restoreOverwrittenFilesWithOriginals')()

/* Locals */
app.locals.captchaId = 0
app.locals.captchaReqId = 1
@@ -192,7 +191,8 @@ i18n.configure({
locales: locales.map(locale => locale.key),
directory: path.join(__dirname, '/i18n'),
cookie: 'language',
defaultLocale: 'en'
defaultLocale: 'en',
autoReload: 'true'
})
app.use(i18n.init)

0 comments on commit 7e75108

Please sign in to comment.
You can’t perform that action at this time.