CrazyDoctor 8 months ago
parent
commit
0aefefd887
3 changed files with 8 additions and 8 deletions
  1. 4 4
      dist/server/Server.js
  2. 0 0
      dist/server/Server.js.map
  3. 4 4
      lib/server/Server.ts

+ 4 - 4
dist/server/Server.js

@@ -66,6 +66,10 @@ class Server {
     }
     }
     init() {
     init() {
         return __awaiter(this, void 0, void 0, function* () {
         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));
             this.i18n.load(path_1.default.resolve(__dirname, Server.i18nDefaultPath));
             yield this.registerMiddlewares(path_1.default.resolve(__dirname, Server.defaultMiddlewaresPath));
             yield this.registerMiddlewares(path_1.default.resolve(__dirname, Server.defaultMiddlewaresPath));
             yield this.registerRoutes(path_1.default.resolve(__dirname, Server.defaultRoutesPath));
             yield this.registerRoutes(path_1.default.resolve(__dirname, Server.defaultRoutesPath));
@@ -82,10 +86,6 @@ class Server {
                 yield this.registerMiddlewares(this.middlewaresPath);
                 yield this.registerMiddlewares(this.middlewaresPath);
             if (this.routesPath)
             if (this.routesPath)
                 yield this.registerRoutes(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() {
     processHttpHandlers() {

File diff suppressed because it is too large
+ 0 - 0
dist/server/Server.js.map


+ 4 - 4
lib/server/Server.ts

@@ -46,6 +46,10 @@ class Server {
 	}
 	}
 
 
 	public async init(): Promise<Server> {
 	public async init(): Promise<Server> {
+		if(this.viewEngine)
+			this.instance.set('view engine', this.viewEngine);
+		if(this.viewsPath)
+			this.instance.set('views', this.viewsPath);
 		this.i18n.load(path.resolve(__dirname, Server.i18nDefaultPath));
 		this.i18n.load(path.resolve(__dirname, Server.i18nDefaultPath));
 		await this.registerMiddlewares(path.resolve(__dirname, Server.defaultMiddlewaresPath));
 		await this.registerMiddlewares(path.resolve(__dirname, Server.defaultMiddlewaresPath));
 		await this.registerRoutes(path.resolve(__dirname, Server.defaultRoutesPath));
 		await this.registerRoutes(path.resolve(__dirname, Server.defaultRoutesPath));
@@ -61,10 +65,6 @@ class Server {
 			await this.registerMiddlewares(this.middlewaresPath);
 			await this.registerMiddlewares(this.middlewaresPath);
 		if(this.routesPath)
 		if(this.routesPath)
 			await this.registerRoutes(this.routesPath);
 			await this.registerRoutes(this.routesPath);
-		if(this.viewEngine)
-			this.instance.set('view engine', this.viewEngine);
-		if(this.viewsPath)
-			this.instance.set('views', this.viewsPath);
 	}
 	}
 
 
 	private processHttpHandlers(): void {
 	private processHttpHandlers(): void {

Some files were not shown because too many files changed in this diff