import { Module , NestModule , MiddlewareConsumer , RequestMethod , } from '@nestjs/common' ; import { NextModule , NextMiddleware , } from '@nestpress/next' ; import { HomeController } from './app.controller' ; @ Module ( { imports : [ NextModule , ] , controllers : [ HomeController , ] , } ) export class AppModule implements NestModule { configure ( consumer ) { consumer . apply ( NextMiddleware ) . forRoutes ( { path : '_next*' , method : RequestMethod . GET , } ) ; consumer . apply ( NextMiddleware ) . forRoutes ( { path : 'static*' , method : RequestMethod . GET , } ) ; } }