Nest-JS getting 404 not found error when return string

Viewed 494

I have boards controller and i made function like this.


@Get('/pay')
  pay(): string {
    return 'asdasdasd';
  }

then i checked on terminal and [Nest] 9076 - 2022. 02. 12. 오후 4:13:12 LOG [RoutesResolver] BoardsController {/boards}: +10ms
[Nest] 9076 - 2022. 02. 12. 오후 4:13:12 LOG [RouterExplorer] Mapped {/boards/pay, GET} route +1ms my router mapped well. so i typed url like this -> localhost:3000/boards/pay

but if i go that url, only {"statusCode":404,"message":"can not find pay","error":"Not Found"} came out.

how can i solve it?

this is my project structure enter image description here

0 Answers
Related