Playing Next Lesson In
seconds

Let's Learn AdonisJS 6 #7.0

The Flow of Middleware

In This Lesson

We'll learn about the middleware that comes preinstalled within AdonisJS and the flow of this middleware during an HTTP Request at both a global and route-specific scale.

Created by
@tomgobich
Published

Join the Discussion 2 comments

Create a free account to join in on the discussion
  1. @guy-aloni

    Why do you apply the guest middleware for each route instead of applying it to the entire group?

    1
    1. Responding to guy-aloni
      @tomgobich

      Hey Guy! I'm applying them here to the individual routes because, in a couple of lessons, we'll be adding a logout route that only authenticated users will be using. So guest won't apply to the whole group.

      1