Router

Router

5 Series
30 Lessons
11h 22m

The AdonisJS Router provides routing capabilities for AdonisJS applications. It allows grouping, param validation, sub-domains, middleware assignment, naming, and so much more. It integrates deeply with the HttpContext and Edge.

Series.

Snippets.

Lessons.

Video preview
Protecting Routes with Auth, Guest, and Admin Middleware
Let's Learn AdonisJS 6 #7.6
Apr 27

Protecting Routes with Auth, Guest, and Admin Middleware

In this lesson, we'll learn about the auth and guest middleware included when we created our AdonisJS 6 project. Then, we'll create our own named middleware that will allow us to restrict page access to only users with the admin role.

Video preview
The Flow of Middleware
Let's Learn AdonisJS 6 #7.0
Apr 20

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.

Video preview
HTTP Method Spoofing HTML Forms
Let's Learn AdonisJS 6 #3.9
Feb 17

HTTP Method Spoofing HTML Forms

In this lesson, we'll learn how we can enable HTTP Method Spoofing to allow AdonisJS to spoof intended HTTP Verbs for basic HTML form POST requests.

Video preview
Deleting Items and Flushing our Redis Cache
Let's Learn AdonisJS 6 #2.15
Feb 04

Deleting Items and Flushing our Redis Cache

Not everyone is perfect, and one day you'll accidentally cache bad data and need a way to quickly clear it out. In this lesson, we'll learn how we can create two routes to clear a single Redis key or flush the entire database.

Video preview
Cleaning Up Routes with Controllers
Let's Learn AdonisJS 6 #2.10
Jan 31

Cleaning Up Routes with Controllers

In this lesson, we'll learn what controllers are and how they can be used to drastically simplify our route definitions by allowing us to move our route handlers off the route definition and into the controller.

Video preview
Let's Learn AdonisJS 6 #2.9
Jan 27

Extracting Reusable Code with Services

In this lesson, we'll learn about services and how we can use them to extract reusable code in a way that makes it super simple to use throughout your project.

Video preview
Listing Movies from their Markdown Files
Let's Learn AdonisJS 6 #2.8
Jan 27

Listing Movies from their Markdown Files

In this lesson, we'll learn how we can list movies and their details directly from our movies directory using a YAML-based declaration called frontmatter.

Video preview
Valdating Route Parameters
Let's Learn AdonisJS 6 #2.4
Jan 24

Validating Route Parameters

In this lesson, we'll learn how we can return a 404 Not Found exception when someone tries to view a movie that doesn't exist. We'll then learn how we can validate our route parameters using Regular Expressions or matchers.

Video preview
Loading A Movie Using Route Parameters
Let's Learn AdonisJS 6 #2.3
Jan 24

Loading A Movie Using Route Parameters

In this lesson, we'll learn how we can reuse a route definition using route parameters to show any item we have for our movie resource.

Video preview
Linking Between Routes
Let's Learn AdonisJS 6 #2.2
Jan 24

Linking Between Routes

In this lesson, we'll learn how we can link between the routes we have defined in our application. We'll also learn about the importance of HTTP Method verbs and resources to standardize our route definitions.

Video preview
Rendering a View for a Route
Let's Learn AdonisJS 6 #2.1
Jan 24

Rendering a View for a Route

In this lesson, we'll learn how we can use the EdgeJS Template Engine to render HTML views and send them back as the response for our routes. We'll also see how we can pass dynamic data into our views from our route handler.

Video preview
Routes and How To Create Them
Let's Learn AdonisJS 6 #2.0
Jan 24

Routes and How To Create Them

In this lesson, we'll learn how to define routes within AdonisJS and how those routes work.

Default Team
Let's Build A Changelog App #4.0
Jan 07, 23

Creating Teams & Setting Default Team

In this stream, we'll be adding the ability to create new teams, set the default team for a user when they switch between teams, and auto-forward users to their default team after login.

Middleware Mountain
Let's Learn AdonisJS 5 #2.7
Nov 06, 22

The Middleware Mountain

In this lesson, we'll learn about the two different types of middleware, global middleware and registered middleware. We'll also take a deep dive into how they play into the flow of an AdonisJS Request.

Method Spoofing HTML Forms
AdonisJS Quick Tip #9.0
Sep 04, 22

Http Method Spoofing & Helper Components in AdonisJS

In this lesson, we'll learn how we can utilize Http Method Spoofing to send PUT, PATCH, and DELETE requests using native HTML forms. We'll then create utility functions to make the implementation cleaner.

Let's Learn AdonisJS 5 #3.1
Dec 02, 21

Route & Controller Resources

In this lesson, we'll learn what a resource is and how we can quickly and easily define a route resource and handle each resourceful route with a resource controller.

Let's Build with AdonisJS #1.2
Nov 16, 21

Rebuilding Jagr.Co, Password Reset & Account Locking

In this livestream, we'll add a system to lock users' accounts after so many bad login attempts and we'll also add in the password reset flow.

Let's Learn AdonisJS 5 #3.0
Nov 10, 21

Handling Routes with Controllers

In this lesson, we'll learn about Controllers and how we can keep our route definitions clean and easy to scan by extracting our route handlers into these Controllers.

Let's Build with AdonisJS #1.1
Nov 06, 21

Rebuilding Jagr.Co, Username Sign In & Post CRUD

In this livestream we cover adding the ability to sign in using either a username or email address. We also dig into setting up the ability to create, read, update, and delete our posts.

Let's Build with AdonisJS #1.0
Oct 30, 21

Rebuilding Jagr.Co, Start & Auth

In this livestream we create a new project, install and configure the Lucid and Auth packages. Define our migrations and model schema. And hammer down basic authentication.

Showing 1 to 20 of 28 results