Create A Paginated API With Node.js - Complete Tutorial

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
    @hamzahahmad16704 жыл бұрын

    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

  • @liorocker1
    @liorocker14 жыл бұрын

    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?

  • @bastiaand
    @bastiaand3 жыл бұрын

    I appreciate how you dive deeper and show useful VS Code extensions and talk a little about async, await and promises. Great job!

  • @rodrigom.castilho4095
    @rodrigom.castilho40953 жыл бұрын

    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.

  • @Pareshbpatel
    @Pareshbpatel3 жыл бұрын

    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 KZread Home Page by some weird coincidence. :-) {2021-08-17}, {2022-07-16}, {2022-10-12}

  • @OstonCodeCypher
    @OstonCodeCypher4 жыл бұрын

    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

  • @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

  • @aeroprojects
    @aeroprojects5 ай бұрын

    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.

  • @huckbit
    @huckbit4 жыл бұрын

    Amazing tutorial, very clear and simple to follow. Thanks a lot!

  • @julianaamerico3722
    @julianaamerico37222 жыл бұрын

    I always learn so much from your videos! You're a really great teacher. Keep on keeping on! 👍

  • @anmolpansari9817
    @anmolpansari98172 жыл бұрын

    Web Dev Simiplified has really Simplified my life! Thank You for this amazing tutorial 😊

  • @brecoldyls
    @brecoldyls4 жыл бұрын

    Thanks so much for these videos Kyle, I really learn a lot from them 😃

  • @shruthibg75
    @shruthibg75 Жыл бұрын

    Thanks for the amazing short , crisp video. You have explained to the point.

  • @gajendra1987
    @gajendra19874 жыл бұрын

    Everything here from explanation to coverage on this concept is picture perfect 👍.

  • @ravi_m249
    @ravi_m2493 жыл бұрын

    You are awesome. I was interning and was assigned this task. I was planning to quit but then this video happened. Thanks 3000

  • @joweltisso7365
    @joweltisso73652 жыл бұрын

    This is what I exactly need to make a paginated API in mirage js, Thank a lot. Please keep up the good work.

  • @saarang4637
    @saarang46373 жыл бұрын

    Great video. Helped me clearly understand the pagination in one shot. Superb!!! Thank you!!

  • @wPatrickGale
    @wPatrickGale3 жыл бұрын

    SO helpful! Thank you for putting this together.

  • @dnextreme
    @dnextreme2 жыл бұрын

    Loved how he explained the simple yet powerful pagination concept in Node.js! Thank you very much. +subbed

  • @HamKibz
    @HamKibz3 жыл бұрын

    Thanks, man I needed this for a personal project.

  • @SACHIN-gd6zy
    @SACHIN-gd6zy4 жыл бұрын

    Hands down, incredible video

  • @ekings2119
    @ekings21194 жыл бұрын

    Simple and Clean, thank you so much.

  • @ogtabuada
    @ogtabuada4 жыл бұрын

    Thank you for this. It's frightening how you made it easy to understand something that seems so complex. :)

  • @fernwood
    @fernwood Жыл бұрын

    The pacing of your videos is sublime.

  • @ajcoder2795
    @ajcoder27954 жыл бұрын

    Kyle 😀.. You makes things easy honestly. 👍..Stay happy and blessed mate

  • @alimodz6253
    @alimodz62534 жыл бұрын

    man I learned more than I needed thanks!

  • @dev-suresh
    @dev-suresh2 ай бұрын

    Thanks for the pagination tutorial. It helped me a lot in doing my interview assignments

  • @eogutier
    @eogutier2 жыл бұрын

    This is spectacularly well done and explained. Holy cow!

  • @claudiuciprianbetiuc3985
    @claudiuciprianbetiuc39854 жыл бұрын

    Amazing demo! Thanks!

  • @firojsiddiki2750
    @firojsiddiki27503 жыл бұрын

    thank you WEB DEV SIMPLIFIED, you explained me exacltly what i wanted and how i wanted it be explained.

  • @andresaparicio7962
    @andresaparicio79623 жыл бұрын

    you are a great instructor man!!

  • @darpananeja6755
    @darpananeja67552 жыл бұрын

    Only one word for you mate, "Legendary!"!!

  • @vibhasvaid
    @vibhasvaid3 жыл бұрын

    Youngman you are great ! your videos are excellent and very clear.

  • @scottlexium
    @scottlexium2 жыл бұрын

    Bro u don't know how much I love your videos 😭 do simplified.

  • @megaplay871
    @megaplay8712 жыл бұрын

    I really love how he just make it simple

  • @jenniferruiz1032
    @jenniferruiz10322 жыл бұрын

    Thank you, bro!! You are very clear teaching!

  • @MeAsMeButMe
    @MeAsMeButMe3 жыл бұрын

    Brilliant explanation, thank you!

  • @illiamedvedev6210
    @illiamedvedev62104 жыл бұрын

    thanks for your tutorial, you explained it all very simple and clear

  • @sebdaniel4029
    @sebdaniel40294 жыл бұрын

    You're awesome ! Thanks a lot for each video 🙇‍♂️

  • @shivamgoyal7717
    @shivamgoyal77173 жыл бұрын

    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!

  • @dgua2917
    @dgua29174 жыл бұрын

    After watching some of your old videos, I press "Like" first and then watch your latest videos.😎

  • @WebDevSimplified

    @WebDevSimplified

    4 жыл бұрын

    Nice!

  • @soufiane_krem
    @soufiane_krem3 жыл бұрын

    That was quite helpful ! Great Video

  • @user-jg7zo2jx2x
    @user-jg7zo2jx2x2 жыл бұрын

    thank you!! this is awesome!!! 형 덕분에 막혔던 부분 뻥 뚫렸습니다.

  • @Jenna2643
    @Jenna26432 жыл бұрын

    This is amazing! Thank you!

  • @thezionjohnson3590
    @thezionjohnson3590 Жыл бұрын

    2022 and this is still Fantastic!

  • @BraveHearts237
    @BraveHearts2372 жыл бұрын

    Thanks this was very helpful

  • @nadaadeclarification
    @nadaadeclarification Жыл бұрын

    insane class, straight and killer.

  • @fendipratama4792
    @fendipratama47923 жыл бұрын

    you saved my life bro, thanks in advance

  • @kcdiazWTV
    @kcdiazWTV2 жыл бұрын

    Awesome tutorial. Thank you.

  • @jayanthit8616
    @jayanthit86162 жыл бұрын

    Thank You its very use full and very clear.

  • @williamjog93
    @williamjog932 жыл бұрын

    Amazing, thank you!

  • @MuhammadWaqas-ux1zu
    @MuhammadWaqas-ux1zu4 жыл бұрын

    this is amazing . you are awesome. thanks you so much. make easy for us :)

  • @surendrajadhav5565
    @surendrajadhav5565 Жыл бұрын

    wow .....this video helped me alot ...thanks for making this type of tutorial/video 👍

  • @keithvaneaton5840
    @keithvaneaton58404 жыл бұрын

    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?

  • @aidarousjibril6323
    @aidarousjibril63234 жыл бұрын

    Great video kyle, always learn something from you, do you've any video about combinig different APIS in Node please ?

  • @BlueHat1
    @BlueHat15 ай бұрын

    Thank you so much!

  • @manikandand2541
    @manikandand25412 жыл бұрын

    thank you sir its really graet to meet u again in my journey

  • @selahadinjemal7138
    @selahadinjemal7138 Жыл бұрын

    Awesome, thanks!

  • @closed482
    @closed4823 жыл бұрын

    You are awesome. The way of explanation is awesome

  • @navinyele2814
    @navinyele28144 жыл бұрын

    This is really amazing sir.......

  • @phenomenal-hardy4438
    @phenomenal-hardy44382 жыл бұрын

    thanks a lot, im subscribing this video really helps

  • @NaveenKumar-ue6oc
    @NaveenKumar-ue6oc2 жыл бұрын

    you saved my time,thanks

  • @tijanisylla1348
    @tijanisylla13482 жыл бұрын

    I love this guy !

  • @ReinaldoTrindade
    @ReinaldoTrindade4 жыл бұрын

    This is gold!

  • @trickstamil7857
    @trickstamil78572 жыл бұрын

    thank you so much......Way of explanation was awesome.......

  • @muhammadyaqoob8000
    @muhammadyaqoob80003 жыл бұрын

    Great Instructor.

  • @rebarius
    @rebarius2 жыл бұрын

    Thank you so much ❤️🙌🏼

  • @Infinitity8
    @Infinitity83 жыл бұрын

    Thanks a lot this really helped. :D

  • @usabnd
    @usabnd3 жыл бұрын

    thank you. how do you do pagination on react

  • @jiyoungyun7494
    @jiyoungyun74943 жыл бұрын

    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?

  • @GuilhermeHenrique-vo1sk
    @GuilhermeHenrique-vo1sk3 жыл бұрын

    thanks very much broww !, u did help me a lot

  • @alanprogressive
    @alanprogressive3 жыл бұрын

    thanks for share! excelent explanation!!!

  • @nathancullen1724
    @nathancullen17244 жыл бұрын

    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

  • @albertbarsegyan3865
    @albertbarsegyan38652 жыл бұрын

    every time you are save me bro, thank you

  • @simonoldenhove9386
    @simonoldenhove93863 жыл бұрын

    Thank you for everything.

  • @RobertWildling
    @RobertWildling4 жыл бұрын

    Very impressiv!! Downvoters should leave a reason as to why they downvote - because I do not see any reason!

  • @hectoralvarado9778
    @hectoralvarado97783 жыл бұрын

    -you are the best! thanks

  • @hoquang1386
    @hoquang13862 жыл бұрын

    thank you very much for great content, handsome developer.

  • @vaninarayan2826
    @vaninarayan28262 жыл бұрын

    Thanks for your amazing content

  • @khalidsaifullahKS
    @khalidsaifullahKS2 жыл бұрын

    that was so great

  • @namangarg3933
    @namangarg39334 жыл бұрын

    Awesome explanation man!!

  • @WebDevSimplified

    @WebDevSimplified

    4 жыл бұрын

    Thanks

  • @thedeveloper643
    @thedeveloper6433 жыл бұрын

    this is it! thank you so muchhh

  • @dhruvhar1683
    @dhruvhar16833 жыл бұрын

    You are awesome, Thanks a lot for this video

  • @ameenschools
    @ameenschools2 жыл бұрын

    I always wonder why your logical thinking and solutions are concise and to the point?? do u have an explanation for that and how can a person feel that confident about programming??? what sources you use what university you attended???

  • @well_done_o7
    @well_done_o77 ай бұрын

    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 🙏

  • @prashantsharmaofficiall
    @prashantsharmaofficiall2 жыл бұрын

    Hey Kyle, you provide us gold at worth of iron. You are Truly a great Developer.

  • @-querthles-2331
    @-querthles-2331 Жыл бұрын

    thank you for much :)

  • @angrypug4387
    @angrypug43872 жыл бұрын

    God bless you, bro!

  • @bizimungupascal2200
    @bizimungupascal22003 жыл бұрын

    Fantastic!!!!!!

  • @aaronestes3282
    @aaronestes32824 жыл бұрын

    Thank you!!!

  • @gauravpoudel7288
    @gauravpoudel72884 жыл бұрын

    u r awesome bruh. Love u

  • @derrickberg2825
    @derrickberg28253 жыл бұрын

    Think you could make a video on using Datatables? I'm trying to do server side processing with MongoDB with pagination. Also trying to figure out how to add buttons to each row that would change a field and a button to display a field that isn't in the table with a modal popup. Love the videos man!

  • @ChrisAthanas
    @ChrisAthanas3 жыл бұрын

    Well done

  • @carlosvanzego6330
    @carlosvanzego63304 ай бұрын

    Thanks!!💻

  • @soumityachauhan8609
    @soumityachauhan86094 жыл бұрын

    😍😍 Awesome

  • @johnconnor9787
    @johnconnor97872 жыл бұрын

    Great video

  • @bushranikhat2326
    @bushranikhat23263 жыл бұрын

    Thanks a lot

  • @nadeerahashankuruppu5962
    @nadeerahashankuruppu59623 жыл бұрын

    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. =)