Skip to content

Add a development mode #19

@Nargonath

Description

@Nargonath

Support plan

  • is this issue currently blocking your project? (yes/no): no
  • is this issue affecting a production system? (yes/no): no

Context

  • node version: N/A
  • module version: latest
  • environment (e.g. node, browser, native): node
  • used with (e.g. hapi application, another framework, standalone, ...): hapi
  • any other relevant information:

What problem are you trying to solve?

As discussed among TSC members, it would be nice to have a development mode for the logs. It would be false by default but once enabled it would print to stdout a bunch of useful information while developing:

  • Errors
  • Responses:
    • Status code
    • Path
    • Method
    • Response time

All with a nice format. Perhaps if we even want to get fancy we could use chalk or something like that for pretty colors.

Do you have a new or modified API suggestion to solve the problem?

I suggest we had a new root field in the plugin registration options:

{
  dev: false
}

This field would be false by default. Another name for the field could be development if we prefer that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew functionality or improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions