mirror of
https://github.com/ajnart/homarr.git
synced 2026-03-02 02:10:59 +01:00
feat: add nestjs app (#172)
This commit is contained in:
19
apps/nestjs/src/app.controller.ts
Normal file
19
apps/nestjs/src/app.controller.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { Controller, Get, Inject } from "@nestjs/common";
|
||||
|
||||
import { AppService } from "./app.service";
|
||||
|
||||
@Controller()
|
||||
export class AppController {
|
||||
// @ts-expect-error decorators are not correctly handled yet
|
||||
constructor(@Inject(AppService) private readonly appService: AppService) {}
|
||||
|
||||
@Get()
|
||||
async getHello(): Promise<string> {
|
||||
return await this.appService.getHello();
|
||||
}
|
||||
|
||||
@Get("/random")
|
||||
getRandom(): string {
|
||||
return Math.random().toString();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user