Add i18n, refactor create
This commit is contained in:
@@ -2,6 +2,7 @@ import fs from "fs"
|
||||
import express from "express"
|
||||
import http from "http"
|
||||
import https from "https"
|
||||
import i18n from "./i18n.js"
|
||||
import routes from "./routes.js"
|
||||
|
||||
const defaulthandler = (req, res, next) => {
|
||||
@@ -27,6 +28,8 @@ const start = (srvConfig) => {
|
||||
router.use(express.json())
|
||||
|
||||
router.pug = pug
|
||||
// router.i18n = i18n
|
||||
app.locals.i18n = i18n
|
||||
|
||||
routes.load(router, srvConfig.features)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user