template-rendering/src/app.controller.ts
2023-07-21 16:13:24 +08:00

14 lines
325 B
TypeScript

import { Controller, Get, Render } from '@nestjs/common';
import { AppService } from './app.service';
@Controller()
export class AppController {
constructor(private readonly appService: AppService) { }
@Get()
@Render('index.hbs')
getHello() {
return { message: 'Hello world!', fruit: ['apple', 'pear'] };
}
}