Create A Paginated API With Node.js - Complete Tutorial

  Рет қаралды 192,887

Web Dev Simplified

Web Dev Simplified

4 жыл бұрын

Pagination is one of the easiest ways to increase the performance of any application you are working on. Luckily setting up pagination is actually pretty simple. In this video I am going to show you the exact process to set up pagination in your own API by going through three distinct steps. First we will build out the most simple pagination set up which will get us started with pagination. After that we will implement a middleware to take care of pagination for use so we can paginate all of our endpoints easily. Lastly, we will connect out paginated API to a MongoDB database so we can have a fully functional paginated API with database storage.
📚 Materials/References:
How To Install MongoDB: • How To Install MongoDB...
GitHub Code: github.com/WebDevSimplified/P...
🧠 Concepts Covered:
- How to accept pagination params in an API
- How to create a pagination middleware
- Creating a middleware that accepts parameters
- Paginating a MongoDB collection
🌎 Find Me Here:
My Courses: courses.webdevsimplified.com
Patreon: / webdevsimplified
Twitter: / devsimplified
Discord: / discord
GitHub: github.com/WebDevSimplified
CodePen: codepen.io/WebDevSimplified
#Pagination #WDS #API

Пікірлер: 249
@hamzahahmad1670
@hamzahahmad1670 4 жыл бұрын
This channel is criminally underrated. You should have blown up by now. Thank you for the quick and thorough explanations.
@WebDevSimplified
@WebDevSimplified 4 жыл бұрын
Thanks. I feel my channel has already blown up
@bastiaand
@bastiaand 3 жыл бұрын
I appreciate how you dive deeper and show useful VS Code extensions and talk a little about async, await and promises. Great job!
@liorocker1
@liorocker1 4 жыл бұрын
Video title should be "How to master backend pagination in 24 minutes"... Amazing demo in a very short time, learning with you really rocks man. Thank you :D
@WebDevSimplified
@WebDevSimplified 4 жыл бұрын
Thank you so much! I try to keep my videos as short as possible, even though sometimes they get a bit long like this video. I'm glad you enjoyed every minute of it, though. :)
@_.sunnyraj._
@_.sunnyraj._ 3 жыл бұрын
*rock
@ishraq95
@ishraq95 3 жыл бұрын
@@WebDevSimplified You are great man.. Thanks alot..
@mdmohiuddin3141
@mdmohiuddin3141 3 жыл бұрын
24 minutes for WDS means 1 hour and 30 minutes for other
@021bethineedilakshmideepak4
@021bethineedilakshmideepak4 2 жыл бұрын
@liorocker1 can we program pagination at the front end level?
@Pareshbpatel
@Pareshbpatel 3 жыл бұрын
A comprehensive tutorial on the pagination of data fetched from MongoDB. Smoothly and fluently presented. Thank you, Kyle. PS This has come very fortuitously when I most needed it! - It simply popped up on my KZbin Home Page by some weird coincidence. :-) {2021-08-17}, {2022-07-16}, {2022-10-12}
@rodrigom.castilho4095
@rodrigom.castilho4095 3 жыл бұрын
Your didactics are simply amazing, man. It must be the 3rd or 4th time you solve an issue of mine in less than 1/3 of an already short video. AND you managed to solve another unrelated question in the meantime. Holy crap, you're an unsung hero.
@xpieceofcakex
@xpieceofcakex Жыл бұрын
This is quick, to the point, with excellent and easy explanations. Really enjoyed this and all of your videos ive come across. Thank you. Told all my classmates about your channel!
@alexgochenour8740
@alexgochenour8740 Жыл бұрын
I like the explanatory style. It was simple yet abstracted enough that I watched this once and was able to immediately apply this to a Lambda function, no Express in my setup. Thank you
@anmolpansari9817
@anmolpansari9817 2 жыл бұрын
Web Dev Simiplified has really Simplified my life! Thank You for this amazing tutorial 😊
@julianaamerico3722
@julianaamerico3722 2 жыл бұрын
I always learn so much from your videos! You're a really great teacher. Keep on keeping on! 👍
@shruthibg75
@shruthibg75 Жыл бұрын
Thanks for the amazing short , crisp video. You have explained to the point.
@huckbit
@huckbit 4 жыл бұрын
Amazing tutorial, very clear and simple to follow. Thanks a lot!
@brecoldyls
@brecoldyls 4 жыл бұрын
Thanks so much for these videos Kyle, I really learn a lot from them 😃
@joweltisso7365
@joweltisso7365 2 жыл бұрын
This is what I exactly need to make a paginated API in mirage js, Thank a lot. Please keep up the good work.
@dev-suresh
@dev-suresh 3 ай бұрын
Thanks for the pagination tutorial. It helped me a lot in doing my interview assignments
@aeroprojects
@aeroprojects 6 ай бұрын
Took only 4 minutes for WDS to build a simple yet working API with the minimal file structure 👍 man, you're always so concise and effective :) Exactly what I was looking for.
@saarang4637
@saarang4637 3 жыл бұрын
Great video. Helped me clearly understand the pagination in one shot. Superb!!! Thank you!!
@wPatrickGale
@wPatrickGale 3 жыл бұрын
SO helpful! Thank you for putting this together.
@OstonCodeCypher
@OstonCodeCypher 4 жыл бұрын
That humble voice makes everything seem easy and indeed they were easy... Thanks for the tutorial,Stay Blessed
@WebDevSimplified
@WebDevSimplified 4 жыл бұрын
I'm really glad I could help.
@jordantaylor8549
@jordantaylor8549 4 жыл бұрын
Yes I agree . I feel like a lot of creators underestimate this actually
@HamKibz
@HamKibz 3 жыл бұрын
Thanks, man I needed this for a personal project.
@gajendra1987
@gajendra1987 4 жыл бұрын
Everything here from explanation to coverage on this concept is picture perfect 👍.
@dnextreme
@dnextreme 2 жыл бұрын
Loved how he explained the simple yet powerful pagination concept in Node.js! Thank you very much. +subbed
@ekings2119
@ekings2119 4 жыл бұрын
Simple and Clean, thank you so much.
@eogutier
@eogutier 2 жыл бұрын
This is spectacularly well done and explained. Holy cow!
@ajcoder2795
@ajcoder2795 4 жыл бұрын
Kyle 😀.. You makes things easy honestly. 👍..Stay happy and blessed mate
@firojsiddiki2750
@firojsiddiki2750 3 жыл бұрын
thank you WEB DEV SIMPLIFIED, you explained me exacltly what i wanted and how i wanted it be explained.
@SACHIN-gd6zy
@SACHIN-gd6zy 4 жыл бұрын
Hands down, incredible video
@ravi_m249
@ravi_m249 3 жыл бұрын
You are awesome. I was interning and was assigned this task. I was planning to quit but then this video happened. Thanks 3000
@alimodz6253
@alimodz6253 4 жыл бұрын
man I learned more than I needed thanks!
@claudiuciprianbetiuc3985
@claudiuciprianbetiuc3985 4 жыл бұрын
Amazing demo! Thanks!
@fernwood
@fernwood Жыл бұрын
The pacing of your videos is sublime.
@andresaparicio7962
@andresaparicio7962 3 жыл бұрын
you are a great instructor man!!
@vibhasvaid
@vibhasvaid 3 жыл бұрын
Youngman you are great ! your videos are excellent and very clear.
@jenniferruiz1032
@jenniferruiz1032 2 жыл бұрын
Thank you, bro!! You are very clear teaching!
@shivamgoyal7717
@shivamgoyal7717 3 жыл бұрын
Thanks Man, You helped me a lottttt to understand this concept and of course in the one go, Means a lot to me, Again Thanks Have a Great Day!
@darpananeja6755
@darpananeja6755 2 жыл бұрын
Only one word for you mate, "Legendary!"!!
@MeAsMeButMe
@MeAsMeButMe 3 жыл бұрын
Brilliant explanation, thank you!
@nadaadeclarification
@nadaadeclarification Жыл бұрын
insane class, straight and killer.
@ogtabuada
@ogtabuada 4 жыл бұрын
Thank you for this. It's frightening how you made it easy to understand something that seems so complex. :)
@user-jg7zo2jx2x
@user-jg7zo2jx2x 2 жыл бұрын
thank you!! this is awesome!!! 형 덕분에 막혔던 부분 뻥 뚫렸습니다.
@illiamedvedev6210
@illiamedvedev6210 4 жыл бұрын
thanks for your tutorial, you explained it all very simple and clear
@sebdaniel4029
@sebdaniel4029 4 жыл бұрын
You're awesome ! Thanks a lot for each video 🙇‍♂️
@surendrajadhav5565
@surendrajadhav5565 Жыл бұрын
wow .....this video helped me alot ...thanks for making this type of tutorial/video 👍
@Jenna2643
@Jenna2643 2 жыл бұрын
This is amazing! Thank you!
@manikandand2541
@manikandand2541 2 жыл бұрын
thank you sir its really graet to meet u again in my journey
@soufiane_krem
@soufiane_krem 3 жыл бұрын
That was quite helpful ! Great Video
@selahadinjemal7138
@selahadinjemal7138 Жыл бұрын
Awesome, thanks!
@BraveHearts237
@BraveHearts237 2 жыл бұрын
Thanks this was very helpful
@kcdiazWTV
@kcdiazWTV 2 жыл бұрын
Awesome tutorial. Thank you.
@fendipratama4792
@fendipratama4792 3 жыл бұрын
you saved my life bro, thanks in advance
@NaveenKumar-ue6oc
@NaveenKumar-ue6oc 2 жыл бұрын
you saved my time,thanks
@BlueHat1
@BlueHat1 5 ай бұрын
Thank you so much!
@phenomenal-hardy4438
@phenomenal-hardy4438 2 жыл бұрын
thanks a lot, im subscribing this video really helps
@williamjog93
@williamjog93 2 жыл бұрын
Amazing, thank you!
@MuhammadWaqas-ux1zu
@MuhammadWaqas-ux1zu 4 жыл бұрын
this is amazing . you are awesome. thanks you so much. make easy for us :)
@jayanthit8616
@jayanthit8616 2 жыл бұрын
Thank You its very use full and very clear.
@dgua2917
@dgua2917 4 жыл бұрын
After watching some of your old videos, I press "Like" first and then watch your latest videos.😎
@WebDevSimplified
@WebDevSimplified 4 жыл бұрын
Nice!
@rebarius
@rebarius 2 жыл бұрын
Thank you so much ❤️🙌🏼
@trickstamil7857
@trickstamil7857 2 жыл бұрын
thank you so much......Way of explanation was awesome.......
@muhammadyaqoob8000
@muhammadyaqoob8000 3 жыл бұрын
Great Instructor.
@megaplay871
@megaplay871 2 жыл бұрын
I really love how he just make it simple
@GuilhermeHenrique-vo1sk
@GuilhermeHenrique-vo1sk 3 жыл бұрын
thanks very much broww !, u did help me a lot
@closed482
@closed482 3 жыл бұрын
You are awesome. The way of explanation is awesome
@hectoralvarado9778
@hectoralvarado9778 3 жыл бұрын
-you are the best! thanks
@tijanisylla1348
@tijanisylla1348 2 жыл бұрын
I love this guy !
@scottlexium
@scottlexium 2 жыл бұрын
Bro u don't know how much I love your videos 😭 do simplified.
@hoquang1386
@hoquang1386 2 жыл бұрын
thank you very much for great content, handsome developer.
@Infinitity8
@Infinitity8 3 жыл бұрын
Thanks a lot this really helped. :D
@albertbarsegyan3865
@albertbarsegyan3865 2 жыл бұрын
every time you are save me bro, thank you
@vaninarayan2826
@vaninarayan2826 2 жыл бұрын
Thanks for your amazing content
@navinyele2814
@navinyele2814 4 жыл бұрын
This is really amazing sir.......
@alanprogressive
@alanprogressive 3 жыл бұрын
thanks for share! excelent explanation!!!
@khalidsaifullahKS
@khalidsaifullahKS 2 жыл бұрын
that was so great
@ReinaldoTrindade
@ReinaldoTrindade 4 жыл бұрын
This is gold!
@thedeveloper643
@thedeveloper643 3 жыл бұрын
this is it! thank you so muchhh
@dhruvhar1683
@dhruvhar1683 3 жыл бұрын
You are awesome, Thanks a lot for this video
@bizimungupascal2200
@bizimungupascal2200 3 жыл бұрын
Fantastic!!!!!!
@aidarousjibril6323
@aidarousjibril6323 4 жыл бұрын
Great video kyle, always learn something from you, do you've any video about combinig different APIS in Node please ?
@simonoldenhove9386
@simonoldenhove9386 3 жыл бұрын
Thank you for everything.
@thezionjohnson3590
@thezionjohnson3590 2 жыл бұрын
2022 and this is still Fantastic!
@namangarg3933
@namangarg3933 4 жыл бұрын
Awesome explanation man!!
@WebDevSimplified
@WebDevSimplified 4 жыл бұрын
Thanks
@-querthles-2331
@-querthles-2331 Жыл бұрын
thank you for much :)
@angrypug4387
@angrypug4387 2 жыл бұрын
God bless you, bro!
@carlosvanzego6330
@carlosvanzego6330 5 ай бұрын
Thanks!!💻
@aaronestes3282
@aaronestes3282 4 жыл бұрын
Thank you!!!
@keithvaneaton5840
@keithvaneaton5840 4 жыл бұрын
This is fantastic, thank you for your very clear teaching. Any chance you have available or could produce a pagination tutorial explaining the process of pulling data from a public API (not from a database) and paginating those results?
@prashantsharmaofficiall
@prashantsharmaofficiall 2 жыл бұрын
Hey Kyle, you provide us gold at worth of iron. You are Truly a great Developer.
@nathancullen1724
@nathancullen1724 4 жыл бұрын
Hi best tutorial I've seen for pagination! Quick question though, in your mongoose example you're finding all results inside a collection, I've got some some routes where I want to paginate every results and then I've got other routes where I'm queering the collection for specific results that I then want to paginate, how would I handle that in the middleware? Thank you
@RobertWildling
@RobertWildling 4 жыл бұрын
Very impressiv!! Downvoters should leave a reason as to why they downvote - because I do not see any reason!
@johnconnor9787
@johnconnor9787 2 жыл бұрын
Great video
@ChrisAthanas
@ChrisAthanas 3 жыл бұрын
Well done
@bushranikhat2326
@bushranikhat2326 3 жыл бұрын
Thanks a lot
@nadeerahashankuruppu5962
@nadeerahashankuruppu5962 3 жыл бұрын
well explained
@expertvinicius
@expertvinicius Жыл бұрын
Omg! It's so easy, thank you so much my friend. But, I'm gonna do that without Express, because I 'hate' Express hahaha. =)
@well_done_o7
@well_done_o7 7 ай бұрын
Ur videos are in the most understandable way compared to others. Thanks you so much.. and i was hoping that is there any way that you create a video about pgination with Search bar.. pls 🙏
@gauravpoudel7288
@gauravpoudel7288 4 жыл бұрын
u r awesome bruh. Love u
@silvesterwali6565
@silvesterwali6565 3 жыл бұрын
really nice
@jiyoungyun7494
@jiyoungyun7494 3 жыл бұрын
I would like to point out that in pagination, there are 2 techniques you can use. one is LIMIT/OFFSET approach, which this video shows. An alternative is KEYSET/SEEK method. It should be noted with LIMIT/OFFSET approach, your users will see some omitted/duplicate items in your pages when someone simultaneously adds/removes some data. So if you are implementing such as infinite scroll on a many-user web-app, go for KEYSET approach instead for stable data retrieval.
@bhupinderbhattarai244
@bhupinderbhattarai244 2 жыл бұрын
can you provide me source how to implement KEYSET approach?
@soumityachauhan8609
@soumityachauhan8609 4 жыл бұрын
😍😍 Awesome
@____prajwal____
@____prajwal____ 4 жыл бұрын
Awesome!
@WebDevSimplified
@WebDevSimplified 4 жыл бұрын
Thank you
@harikotha7
@harikotha7 3 жыл бұрын
Awesome
How To Build A URL Shortener With Node.js, Express, and MongoDB
25:38
Web Dev Simplified
Рет қаралды 184 М.
Web API Pagination | Offset-based vs Cursor-based
11:03
Ambient Coder
Рет қаралды 43 М.
Smart Sigma Kid #funny #sigma #comedy
00:25
CRAZY GREAPA
Рет қаралды 18 МЛН
ОСКАР vs БАДАБУМЧИК БОЙ!  УВЕЗЛИ на СКОРОЙ!
13:45
Бадабумчик
Рет қаралды 4,5 МЛН
I Can't Believe We Did This...
00:38
Stokes Twins
Рет қаралды 92 МЛН
ОСКАР ИСПОРТИЛ ДЖОНИ ЖИЗНЬ 😢 @lenta_com
01:01
Simple Frontend Pagination | React
19:13
Traversy Media
Рет қаралды 476 М.
Vite Crash Course | Faster Alternative To CRA
16:24
Traversy Media
Рет қаралды 190 М.
The Most Important Skill You Never Learned
34:56
Web Dev Simplified
Рет қаралды 172 М.
Learn Express Middleware In 14 Minutes
14:48
Web Dev Simplified
Рет қаралды 389 М.
Learn Express JS In 35 Minutes
36:03
Web Dev Simplified
Рет қаралды 768 М.
JavaScript Pagination in ~10 Minutes (Super EASY!!)
13:06
James Q Quick
Рет қаралды 26 М.
Build A Restful Api With Node.js Express & MongoDB | Rest Api Tutorial
53:55
The TSConfig Cheat Sheet
5:36
Matt Pocock
Рет қаралды 33 М.
Smart Sigma Kid #funny #sigma #comedy
00:25
CRAZY GREAPA
Рет қаралды 18 МЛН