From the course: Master Next.js: Elaborate Hands-On Web Development, React Basics, Advanced Next.js, and Deployment
Unlock this course with a free trial
Join today to access over 25,200 courses taught by industry experts.
API routes with Next.js
From the course: Master Next.js: Elaborate Hands-On Web Development, React Basics, Advanced Next.js, and Deployment
API routes with Next.js
With Next.js, you actually have some built-in functionality to do API routes. And basically, an API route is a way to create serverless endpoints. So you don't need to have a server, but if you want to access, like, handle HTTP requests, those routes are meant to handle server-side logic. So for serverless deployments like Versal or AWS Lambda, what happens is, if you're running with AWS, they're going to leverage the underlying serverless infrastructure to provide you which is a very convenient and clean way to build server-side logic. Generally, people know AWS. Let's say you want to create an API endpoint. You could really do so by just creating a function that's like a handler, like you would with Express, that would have request and response. I have a full course on Express and Node if you're curious and learning more about CRUD. And I always think it's good to kind of learn about that stuff, even though the whole point here is you don't need that. You don't need to create your…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
-
-
-
(Locked)
How to create dynamic routes with Next.js7m 15s
-
(Locked)
getStaticPaths with Next.js implementation5m 14s
-
(Locked)
Mastering dynamic static rendering with Next.js12m 3s
-
(Locked)
Rendering markdown and security vulnerabilities with injected HTML11m 23s
-
(Locked)
Polishing the dynamic post pages10m 43s
-
(Locked)
Polishing a Next.js component with styling7m 22s
-
(Locked)
Fetching data and database querying plus ISR with Next.js11m 26s
-
(Locked)
API routes with Next.js9m 1s
-
(Locked)
-