feat: add nestjs app (#172)
This commit is contained in:
1 parent
7f2ab7f192
commit
9440d04261
16 files changed
+2181
-181
No files matched your search
@@ -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