Skip to content

Commit

Permalink
Merge pull request #9 from tanukiapp/development
Browse files Browse the repository at this point in the history
[FIX] Linter errors
  • Loading branch information
JuanjoSalvador authored Feb 4, 2024
2 parents ad65531 + 56d064c commit 880ff42
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 27 deletions.
40 changes: 20 additions & 20 deletions src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ const createError = require('http-errors')
const express = require('express')
const path = require('path')
const cookieParser = require('cookie-parser')
const logger = require('morgan')
const logger = require('morgan')

const i18next = require('i18next');
const i18nextMiddleware = require('i18next-http-middleware');
const Backend = require('i18next-node-fs-backend');
const i18next = require('i18next')
const i18nextMiddleware = require('i18next-http-middleware')
const Backend = require('i18next-node-fs-backend')

const indexRouter = require('./routes/index')
const apiRouter = require('./routes/api')
Expand All @@ -15,24 +15,24 @@ const app = express()

// Localize
i18next
.use(i18nextMiddleware.LanguageDetector)
.use(Backend)
.init({
backend: {
loadPath: __dirname + '/locales/{{lng}}/{{ns}}.json'
},
debug: true,
detection: {
order: ['querystring', 'cookie'],
caches: ['cookie']
},
preload: ['en', 'es'],
saveMissing: true,
fallBackLng: ['en']
.use(i18nextMiddleware.LanguageDetector)
.use(Backend)
.init({
backend: {
loadPath: path.join(__dirname, '/locales/{{lng}}/{{ns}}.json')
},
debug: true,
detection: {
order: ['querystring', 'cookie'],
caches: ['cookie']
},
preload: ['en', 'es'],
saveMissing: true,
fallBackLng: ['en']

});
})

app.use(i18nextMiddleware.handle(i18next));
app.use(i18nextMiddleware.handle(i18next))

// view engine setup
app.set('views', path.join(__dirname, 'views'))
Expand Down
9 changes: 2 additions & 7 deletions src/controllers/index_controller.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
var express = require('express');
var router = express.Router();
const i18next = require('i18next');


class IndexController {
static index(req, res, next) {
static index (req, res, next) {
res.render('index')
}
}

module.exports = IndexController;
module.exports = IndexController

0 comments on commit 880ff42

Please sign in to comment.