The Complete Strapi™ Course with Plugins and Deployment - Creating Custom Routes

The Complete Strapi™ Course with Plugins and Deployment - Creating Custom Routes

Assessment

Interactive Video

Information Technology (IT), Architecture

University

Hard

Created by

Quizizz Content

FREE Resource

The video tutorial explains how to create a custom router in a web application. It covers the necessary file structure and parameters, including method, path, handler function, and optional configuration. The configuration object can include oath policies and middlewares, with default settings applied if omitted. An example demonstrates creating a custom route file, adding routes with methods, paths, and handlers. The tutorial also mentions using route parameters and regular expressions. Testing is not possible yet, but future exercises will cover it. The syntax for creating custom routes is highlighted, with a preview of upcoming topics on policies.

Read more

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the minimum number of parameters required to define a custom route?

Four

Two

Five

Three

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is NOT a method associated with a route?

GET

POST

FETCH

DELETE

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In the example provided, what is the file name used to create a custom route?

routeExample.js

routeConfig.js

customRouteConfig.js

customRoute.js

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What can be used in defining a custom route besides route parameters?

HTML elements

Regular expressions

XML tags

JSON objects

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Why can't the custom route be tested in Strapi immediately?

The server is down

The custom controller doesn't exist

The API is not configured

The database is not connected