question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Console output doesn't show for which URL controllers are mapped for.

See original GitHub issue
╭─cojack@cojack-desktop  ~/Projects/private/nest/examples/01-cats-app  ‹master*› 
╰─$ npm start

> nest-typescript-starter@1.0.0 start /home/cojack/Projects/private/nest/examples/01-cats-app
> node index.js

[Nest] 28918   - 9/14/2017, 11:10:29 AM   [NestFactory] Starting Nest application...
[Nest] 28918   - 9/14/2017, 11:10:29 AM   [InstanceLoader] ApplicationModule dependencies initialized
[Nest] 28918   - 9/14/2017, 11:10:29 AM   [InstanceLoader] CatsModule dependencies initialized
[Nest] 28918   - 9/14/2017, 11:10:29 AM   [RoutesResolver] CatsController:  <- HERE
[Nest] 28918   - 9/14/2017, 11:10:29 AM   [RouterExplorer] Mapped {/, POST} route
[Nest] 28918   - 9/14/2017, 11:10:29 AM   [RouterExplorer] Mapped {/, GET} route
[Nest] 28918   - 9/14/2017, 11:10:29 AM   [NestApplication] Nest application successfully started

Output from console doesn’t show for which URL controllers are mapped for.

╭─cojack@cojack-desktop  ~/Projects/private/nest/examples/01-cats-app  ‹master*› 
╰─$ cat src/modules/cats/cats.controller.ts 
import { Controller, Get, Post, Body, UseGuards, ReflectMetadata, UseInterceptors } from '@nestjs/common';
import { CreateCatDto } from './dto/create-cat.dto';
import { CatsService } from './cats.service';
import { Cat } from './interfaces/cat.interface';
import { RolesGuard } from '../common/guards/roles.guard';
import { Roles } from '../common/decorators/roles.decorator';
import { LoggingInterceptor } from '../common/interceptors/logging.interceptor';
import { TransformInterceptor } from '../common/interceptors/transform.interceptor';

@Controller('cats')
@UseGuards(RolesGuard)
@UseInterceptors(LoggingInterceptor, TransformInterceptor)
export class CatsController {
  constructor(private readonly catsService: CatsService) {}

  @Post()
  @Roles('admin')
  async create(@Body() createCatDto: CreateCatDto) {
    this.catsService.create(createCatDto);
  }

  @Get()
  async findAll(): Promise<Cat[]> {
    return this.catsService.findAll();
  }
}

So I guess this line: [Nest] 28918 - 9/14/2017, 11:10:29 AM [RoutesResolver] CatsController: <- HERE Should display something like: [Nest] 28918 - 9/14/2017, 11:10:29 AM [RoutesResolver] CatsController: cats

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
cojackcommented, Sep 16, 2017

@kamilmysliwiec I was pretty sure, that in v2 it works like this 😈

0reactions
lock[bot]commented, Sep 25, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

spring boot 2.x console log does not print mapped controller info
Normally when spring boot app starts, the eclipse console should print out the mapped controller and the accessing url, why didn't I see...
Read more >
How to Access Route Helpers from Rails Console
This post shows a simple way to check the output of URL and path helpers ... In Rails, routes map an incoming URL...
Read more >
Set up request and response data mappings using the API ...
Learn how to use the API Gateway console to set up request and response data mappings.
Read more >
Handle errors in ASP.NET Core web APIs - Microsoft Learn
This article describes how to handle errors and customize error handling with ASP.NET Core web APIs. Developer Exception Page.
Read more >
Keyboard Control - mpv.io
Show the console. (ESC closes it again. See CONSOLE.) (The following keys are valid only when using a video output that supports the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found