feat: Server side translation setup (#4657)
* Server side translation setup * docs
This commit is contained in:
@@ -9,6 +9,7 @@ import mount from "koa-mount";
|
||||
import enforceHttps, { xForwardedProtoResolver } from "koa-sslify";
|
||||
import env from "@server/env";
|
||||
import Logger from "@server/logging/Logger";
|
||||
import { initI18n } from "@server/utils/i18n";
|
||||
import routes from "../routes";
|
||||
import api from "../routes/api";
|
||||
import auth from "../routes/auth";
|
||||
@@ -37,6 +38,8 @@ if (env.CDN_URL) {
|
||||
}
|
||||
|
||||
export default function init(app: Koa = new Koa()): Koa {
|
||||
initI18n();
|
||||
|
||||
if (isProduction) {
|
||||
// Force redirect to HTTPS protocol unless explicitly disabled
|
||||
if (env.FORCE_HTTPS) {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import Logger from "@server/logging/Logger";
|
||||
import { setResource } from "@server/logging/tracer";
|
||||
import { traceFunction } from "@server/logging/tracing";
|
||||
import { initI18n } from "@server/utils/i18n";
|
||||
import {
|
||||
globalEventQueue,
|
||||
processorEventQueue,
|
||||
@@ -11,6 +12,8 @@ import processors from "../queues/processors";
|
||||
import tasks from "../queues/tasks";
|
||||
|
||||
export default function init() {
|
||||
initI18n();
|
||||
|
||||
// This queue processes the global event bus
|
||||
globalEventQueue.process(
|
||||
traceFunction({
|
||||
|
||||
Reference in New Issue
Block a user