import { Controller , Get , Req , Res , } from '@nestjs/common' ; import { Request , Response , } from 'express' ; import { NextService } from '@nestpress/next' ; import { ArticleService } from '../../logics/article/article.service' ; import { Article } from '../../../entities/article.entity' ; @ Controller ( ) export class HomeController { constructor ( private readonly nextService , private readonly articleService ) { } @ Get ( ) public async showHome ( @ Req ( ) req , @ Res ( ) res ) { const articles = await this . articleService . findAll ( ) ; return this . nextService . render ( '/index' , { articles } , req , res ) ; } }