Commit f7bfcab7 authored by Разиев Абдрашид's avatar Разиев Абдрашид 💬

Sorry

parent 04ff1da5
...@@ -3,6 +3,7 @@ import { Application, RequestHandler } from 'express'; ...@@ -3,6 +3,7 @@ import { Application, RequestHandler } from 'express';
import { AppInit } from './interfaces/AppInit.interface'; import { AppInit } from './interfaces/AppInit.interface';
import { IRoute } from './interfaces/IRoute.interface'; import { IRoute } from './interfaces/IRoute.interface';
console.log(1)
class App { class App {
public app: Application; public app: Application;
public port: number; public port: number;
...@@ -14,6 +15,7 @@ class App { ...@@ -14,6 +15,7 @@ class App {
this.initMiddlewares(appInit.middlewares); this.initMiddlewares(appInit.middlewares);
this.initRoutes(appInit.controllers); this.initRoutes(appInit.controllers);
} }
private initMiddlewares(middlewares: RequestHandler[]) { private initMiddlewares(middlewares: RequestHandler[]) {
middlewares.forEach((middleware) => { middlewares.forEach((middleware) => {
this.app.use(middleware); this.app.use(middleware);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment