import { MiddlewareConsumer, Module, NestModule } from '@nestjs/common';
import { RootModule } from './root/root.module';
import { HttpMiddleware } from './common/middleware/http.middleware';
import { NetworkModule } from './modules/network/network.module';

@Module({
  imports: [RootModule, NetworkModule],
})
export class AppModule implements NestModule {
  configure(consumer: MiddlewareConsumer): any {
    consumer.apply(HttpMiddleware).forRoutes('api');
  }
}
