|
@@ -66,6 +66,10 @@ class Server {
|
|
|
}
|
|
|
init() {
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
+ if (this.viewEngine)
|
|
|
+ this.instance.set('view engine', this.viewEngine);
|
|
|
+ if (this.viewsPath)
|
|
|
+ this.instance.set('views', this.viewsPath);
|
|
|
this.i18n.load(path_1.default.resolve(__dirname, Server.i18nDefaultPath));
|
|
|
yield this.registerMiddlewares(path_1.default.resolve(__dirname, Server.defaultMiddlewaresPath));
|
|
|
yield this.registerRoutes(path_1.default.resolve(__dirname, Server.defaultRoutesPath));
|
|
@@ -82,10 +86,6 @@ class Server {
|
|
|
yield this.registerMiddlewares(this.middlewaresPath);
|
|
|
if (this.routesPath)
|
|
|
yield this.registerRoutes(this.routesPath);
|
|
|
- if (this.viewEngine)
|
|
|
- this.instance.set('view engine', this.viewEngine);
|
|
|
- if (this.viewsPath)
|
|
|
- this.instance.set('views', this.viewsPath);
|
|
|
});
|
|
|
}
|
|
|
processHttpHandlers() {
|