Let's Learn AdonisJS 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.

Difficulty Beginner
What's Inside 29 Lessons
Sign up to save progress
1

Module 1
Introduction

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.

4m 47s
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

12m 5s
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

11m 32s
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.

7m 1s
2

Module 2
Routing

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.

6m 14s
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.

14m 1s
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

4m 19s
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.

8m 28s
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.

5m 31s
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.

13m 50s
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.

15m 44s
2.7

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.

12m 44s
3

Module 3
Controllers

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.

13m 20s
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.

13m 42s
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.

15m 14s
4

Module 4
Service Providers

4.0

Service Providers & The IoC Container

We'll learn about Service Providers and how they interact with the IoC Container. We'll then put this to practice by wrapping a NodeJS package so it's easy to use within AdonisJS

18m 45s
5

Module 5
Lucid ORM

5.0

Introducing, Installing, and Configuring Lucid ORM

In this lesson, we'll learn about Lucid ORM; its capabilities, Ace CLI commands, and the difference between it and the Database module. We'll then install and configure it within our project.

10m 0s
5.1

Migrations & Understanding the Flow of Migrations

In this lesson, we'll learn all about migrations, what they are, how they're used, and how they're tracked. We'll also learn about the flow of migrations and how they work similarly to a timeline.

16m 36s
5.2

What To Know Before Altering Your Database with Migrations

In this lesson, we'll discuss two different flows you can use to alter your database. One, when working completely locally and another when a migration has already been executed on your production database.

10m 26s
5.3

What Is A Model?

In this lesson, we'll delve into AdonisJS Models learning what they are, what they represent, how to create them, what we can do with them, and more.

12m 44s
5.4

Database Schema to Migration

In this lesson, we'll walk through a real-world example of a database schema and how to create migrations. We'll define each table's columns, primary keys, and foreign keys.

11m 56s
5.5

Database Migrations To Lucid Models

In this lesson, we'll walk through examples of transferring our database migrations into our Lucid Models. This will pave the way for us to begin CRUD operations in later lessons.

4m 59s
5.6

Defining Model Relationships

In this lesson, we'll learn how to define relationships on our Lucid Models. We'll cover one-to-one, many-to-one, one-to-many, and many-to-many relationship definitions.

13m 4s
5.7

Creating Records with Lucid ORM

In this lesson, we'll learn various ways we can create and bulk-create records using the AdonisJS Lucid ORM.

12m 38s
5.8

Password Hashing & Model Hook Overview

In this lesson, we'll learn briefly about the model hooks available and how they work. Then, we'll walk through an example by hashing our password anytime it is changed.

8m 42s
5.9

Easy Querying with Static Model Query Methods

In this lesson, we'll learn what static methods are available on our Lucid Models to help us easily query records from our database. These methods offer a convenient query option compared to the query builder.

7m 41s
6

Module 6
Query Builder

6.0

Intro to the Query Builder & It's Where Statements

In this lesson, we'll introduce the query builder. We'll spend most of our time looking at its various where statement options and how we can use them to build queries.

6m 39s
6.1

Limiting, Sorting, & Pagination with the Query Builder

In this lesson, we'll take a look at the various options we have to limit results when using the query builder including first, firstOrFail, limit, and pagination. We'll also learn how we can sort our results.

4m 57s
6.2

Model vs Database Query Builder

In this lesson, we'll take a look at the differences between the model and database query builders.

5m 58s