Let's Learn Adonis 5

Learn AdonisJS 5 in-depth as we step through all the major functionalities of the framework in-depth. Learn about Routing, Controllers, Lucid, Auth, and much more.

14 Lessons

1. Introduction

LESSON

1.0

Prerequisites & Creating A New Project

In this lesson, we'll learn about AdonisJS 5; what it is, what it offers, its prerequisites, and how to create a new project. We'll then start our project up to ensure everything is working.

5 min
LESSON

1.1

Project Structure

In this lesson, we'll get familiar with our Adonis 5 project by running through all the folders and files and their purposes. We'll learn which folders and files within our project structure

12 min
LESSON

1.2

Introducing the Ace CLI

In this lesson, we'll be learning about Adonis' command-line interface (CLI). Including what the Ace CLI is, its options, how it'll be expanded, and how we can create custom commands

7 min
LESSON

1.3

Understanding the HttpContext

The HttpContext object contains unique information about individual requests our application receives. In this lesson, we'll cover what it is, how it's passed, and how we can mutate it.

5 min

2. Routing

LESSON

2.0

Routing Introduction

We'll learn how to define routes in Adonis using the Route module. We'll cover defining routes for specific HTTP Methods (like GET, POST, PUT/PATCH, and DELETE), Caveats, and Brisk Routes.

8 min
LESSON

2.1

Dynamic Routing with Route Parameters

In this lesson, we go in-depth with route parameters covering optional route params, validation using matchers, casting, wildcards, and a few things to watch out for.

9 min
LESSON

2.2

Moving & Organizing Routes

In this lesson, we'll cover various different ways you can structure your routes within your Adonis project, including moving the routes.ts file, and using a module approach

4 min
LESSON

2.3

Naming, Grouping, & Prefixing Routes

In this lesson, we'll learn about naming routes and using groups with prefixes to structure our routes and reduce redundancies.

7 min
LESSON

2.4

Multi-File Route Grouping Strategies

In this lesson, we'll discuss strategies you can use to apply multiple files worth of route definitions into a single route group without redefining the route group in each file.

4 min
LESSON

2.5

Generating URLs and Signed URLs

In this lesson, we'll be focusing specifically on generating URLs from our route definitions. We'll cover generating generic URLs, signed URLs, redirect URLs, and more.

8 min
LESSON

2.6

Extending the Adonis Router and Route Matchers

In this lesson, we'll be learning how we can add our own chainable methods using macros to the Adonis Router's Route, Route Group, Route Resource, Brisk Route, and Matchers properties.

9 min

3. Controllers

LESSON

3.0

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.

7 min
LESSON

3.1

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.

7 min
LESSON

3.2

Static, Non-Static, & Singleton Services

We'll learn what services are. We'll then discuss three different ways we can use them within our AdonisJS application, including static, non-static, and singleton services.

10 min