Skip to content

Routes: wildcard route needs a parameter to work with but is missing in the example in the lesson #29638

Open
@HemantDahiyaCodes

Description

@HemantDahiyaCodes

Checks

Describe your suggestion

in the example snippet of "Order matters"

app.get("*", (req, res) => {
  res.send("* is a great way to catch all otherwise unmatched paths, e.g. for custom 404 error handling.");
});

the wildcard now needs a name parameter to work with. For example:

app.get("*some-name", (req, res) => { res.send("This should match all routes!"); })
the above snippet will work. Please update if it is an actual error.

Path

Node / JS

Lesson Url

https://www.theodinproject.com/lessons/nodejs-routes

(Optional) Discord Name

hemantxLynn

(Optional) Additional Comments

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions