Server Side Routing - Rest APIs In Depth

Published: 25 September 2023
on channel: Tech with Nader
710
45

Let's learn about some methods used to do server-side routing on the server in Deno together.

We start with an overview of what server side routing is and why we'll need it in order to build our web server and REST API. Then, we go through the most common ways we'll encounter server-side routing.

Starting with the simplest approach, we look at how we'd use conditional statements like if/else statements to route based on the pathname of the requesting route. We add to this approach by looking at how a switch statement can also do a similar thing.

Then, we look at using Regular Expressions to match routes and some of the challenges and issues that might arise.

Finally, we look at the URLPattern API which is a Web Standard API to deal with URL's and pattern matching on their various components in an intuitive way. This is the approach we'll mainly be using in this course as well together.

Chapters:
00:00 Introduction
01:35 Server Routing Overview
03:08 Common Routing Methods
06:48 If-Else Based Routing
08:40 If-Else Routing Code Example
16:30 Switch Based Routing
21:28 Regex Based Routing
26:57 Regex Routing Code Example
32:02 URL Pattern Based Routing
33:45 URL Pattern Code Example
38:15 Custom and Dynamic URL Patterns
41:07 Dynamic Paths Code Example
46:37 URLPattern Documentation
48:29 Next Steps

📦 Github Repository with the notes and exercise code+solutions: https://github.com/Nooder/rest-api-in...

💬 Come join us on Discord to chat with a like-minded community about tech and learning:   / discord  

🏅Support the channel and content through Super Thanks, Channel Memberships, or on Patreon:   / techwithnader  


Watch video Server Side Routing - Rest APIs In Depth online without registration, duration hours minute second in high quality. This video was added by user Tech with Nader 25 September 2023, don't forget to share it with your friends and acquaintances, it has been viewed on our site 71 once and liked it 4 people.