Implement Search, Sort, Filter and Pagination Rest API With Node JS | Express | MongoDB

Поділитися
Вставка
  • Опубліковано 19 чер 2022
  • What's up Guys,
    Today we gonna be building this awesome project with MERN stack. By building this project you gonna learn how to create API which handle pagination, sort, filter and search. Yes, all of this in one API. And we also gonna learn how to call this API and show the data in beautiful UI from frontend with React.
    Why do we need to build API's like this. Because By adding search, filter with pagination makes it easier for the user to find what he is looking. I'm so excited to build this project for you guys, I hope you too. Before we jump into our vscode those who new to this channel I highly recommend you to subscribe and like this video. So without wasting time Let's Get Started....
    Source Code : github.com/cyber-wolve/IMDB_C...
    ╔═╦╗╔╦╗╔═╦═╦╦╦╦╗╔═╗
    ║╚╣║║║╚╣╚╣╔╣╔╣║╚╣═╣
    ╠╗║╚╝║║╠╗║╚╣║║║║║═╣
    ╚═╩══╩═╩═╩═╩╝╚╩═╩═╝
    Music In Video :
    Rhodesia by Twin Musicom is licensed under a Creative Commons Attribution 4.0 license.
    creativecommons.org/licenses/...
    Artist: www.twinmusicom.org/
  • Наука та технологія

КОМЕНТАРІ • 59

  • @CyberW0lves
    @CyberW0lves  Рік тому +5

    Watch this video to Implement Search, Sort, Filter and Pagination in React JS
    => ua-cam.com/video/_i4Wi43NTDo/v-deo.html

  • @laxmikanthgurram1074
    @laxmikanthgurram1074 7 місяців тому +3

    subscribed brother. Feeling proud that you are an Indian brother. You are doing a great job ,the same would have been explained by other youtubers like for more than 2 hours. Dont stop ,keep doing more and more MERN stack projects in same fashion .God bless you!!

  • @vampirekabir
    @vampirekabir Рік тому +12

    other youtubers will take 3 hour to teach the same thing,thanks for being concise

    • @laxmikanthgurram1074
      @laxmikanthgurram1074 7 місяців тому +1

      exactly!!

    • @PlatonBC
      @PlatonBC 5 місяців тому

      Oh yes!🎉

    • @aayu_r
      @aayu_r 15 днів тому

      But they will explain each and everything, and why are we using any option that's why so that you do need to watch any video again

  • @ThabaniMASUKUME
    @ThabaniMASUKUME 2 місяці тому

    Hey there, this was very informational. Thank you for taking your time in preparing this!

  • @ghulammohiyuddin387
    @ghulammohiyuddin387 Рік тому

    what a quick implementation ... great dear thanks for this logic.

  • @viki9126
    @viki9126 Рік тому

    thank you sir for quality content waiting for the next video.

  • @kazugaming1463
    @kazugaming1463 Рік тому

    Bro, been looking for a system like this one, thanks bro

  • @OptimusPrime-js1zf
    @OptimusPrime-js1zf Рік тому +1

    This is really amazing video man.
    Keep posting such videos.
    BTW I loved the way you explain each step u worked on.

  • @maniac1441
    @maniac1441 Рік тому +1

    Thanks, helped me a lot

  • @agustincristobo9634
    @agustincristobo9634 Рік тому +4

    nicely done, i finally understand how to make a search for my api 😊. ty a lot sir

  • @karamsahoo6852
    @karamsahoo6852 2 роки тому

    Nice one

  • @MuhammadAhmad-bx2rw
    @MuhammadAhmad-bx2rw Рік тому

    amazing video editing. You can make a video editing course as well. Nice code!

  • @frandepaulo
    @frandepaulo Рік тому

    Beautiful

  • @alaluddin9005
    @alaluddin9005 Рік тому

    Thank you so much sir...

  • @Hrit
    @Hrit Рік тому

    Good tutorial!

  • @user-vp9qe7gh1h
    @user-vp9qe7gh1h Місяць тому

    Спасибо Вам большое за Вашу работу!

  • @eilleenlambo309
    @eilleenlambo309 2 місяці тому

    nice one

  • @bagmat
    @bagmat Рік тому +2

    what tool did you use to create your mock-ups

  • @jainilmaheshwari475
    @jainilmaheshwari475 2 роки тому +1

    Make a video on implementing Roles in api

  • @SahilKhatri-ph4hv
    @SahilKhatri-ph4hv 9 місяців тому

    Bro please upload the next part of this video which is related to frontend api handling

  • @kalpeshwani231
    @kalpeshwani231 2 роки тому

    👍

  • @feyroozcode
    @feyroozcode Рік тому

    This video need mores view

  • @BecomeALengend
    @BecomeALengend Рік тому +1

    @CyberWolves please upload frontend part🙏

  • @vanithb6630
    @vanithb6630 2 роки тому +4

    bro... we are waiting next video.. please upload it.. thanks lot bro

    • @CyberW0lves
      @CyberW0lves  2 роки тому

      Will upload soon

    • @rmt0858
      @rmt0858 2 роки тому

      @@CyberW0lves upload soon

  • @pankajpanday6351
    @pankajpanday6351 16 днів тому

    This video is pure gold but lacks one most important thing called "explanation"...so basically just a github code made to video...i would rather look at code if this is the explanation

  • @eshw23
    @eshw23 Рік тому

    The postman part was very confusing, please give a quick explanation of how to set up these API's or databases next time.

  • @Tarunkumar_Gatla
    @Tarunkumar_Gatla 2 роки тому

    Create more nodejs projects🙏

  • @mohamedfayis1561
    @mohamedfayis1561 Рік тому

    what if we want to use search for Number datatype?

  • @herolooter3868
    @herolooter3868 Рік тому

    Your theme bro? And font?

  • @mehemmednezerli38
    @mehemmednezerli38 Рік тому +2

    Hi friend, I need a help. How can I give two options to the sort method? for example in this video we have sort by genres so can we add another options such as lemme say we have films and they have genres and costs and we have to sort it not only in genres but also in costs for example : movie "Interstellar"
    cost:"12"
    genre:"Sci-fic"
    and user can sort only in cost or only in genre or with both of them
    Can you help me? thanks in advance man:)

    • @fxpin9293
      @fxpin9293 Рік тому +1

      I'm facing with the same problem, I've tried few things to add a second tcheckbox with other choices but I'm stucked. Anyway thanks a lot to Cyberwolf for this perfect tutorial !

    • @mehemmednezerli38
      @mehemmednezerli38 Рік тому

      @@fxpin9293 dude if you found how to add two different categories feel free to share your knowledge bud :)

  • @pratheeshm400
    @pratheeshm400 5 місяців тому

    WHat if I want rating along with gender filter?

  • @pitpat6319
    @pitpat6319 Рік тому +1

    I can't get my total to go below eight, even when I filter. I have eight documents in the database
    EDIT: Okay I did it.
    const total = await Project.find({name: {$regex: search, $options: "i"}}).where("genre").in([...genre]).countDocuments({
    language: { $in: [...genre] },
    name: { $regex: search, $options: "i" },
    });
    I had to add the filters (without the skip and limit) to the total.

  • @kalpeshwani231
    @kalpeshwani231 Рік тому

    Please upload the next video

    • @CyberW0lves
      @CyberW0lves  Рік тому

      Sorry for the delay will upload soon.

    • @chiragmehta900
      @chiragmehta900 Рік тому

      Hey guys, try out this node js typescript boilerplate
      github.com/chiragmehta900/node-typescript-boilerplate-postgres
      Please stare at this repository if you like this.

  • @vijaykoladara8302
    @vijaykoladara8302 Рік тому +2

    How to implement in react ?

    • @pitpat6319
      @pitpat6319 Рік тому +3

      To implement in React. You create a useState (example, backendData)
      In a useEffect fetch the api and format the api like this: `/api/movies?page=${page}&name=${name}&genre=${genre}`
      still within the useEffect, set the backendData to that link
      The curly brackets are useStates that you can input later.

  • @gabyiy
    @gabyiy Рік тому

    Hi i get this error when i try to make the search with postman
    const castError = new CastError();
    ^
    CastError: Cast to ObjectId failed for value "movies" (type string) at path "_id" for model "Recipe"
    at model.Query.exec (C:\Users\Gabi\OneDrive\Desktop\food cloud\server
    ode_modules\mongoose\lib\query.js:4786:21)
    at model.Query.Query.then (C:\Users\Gabi\OneDrive\Desktop\food cloud\server
    ode_modules\mongoose\lib\query.js:4885:15)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
    messageFormat: undefined,
    stringValue: '"movies"',
    kind: 'ObjectId',
    value: 'movies',
    why i get this ? ty

    • @pitpat6319
      @pitpat6319 Рік тому

      It looks like a problem within the Schema. Do you have a link to the project?

  • @kalpeshwani231
    @kalpeshwani231 Рік тому

    kab ayegi next video

  • @stain5570
    @stain5570 Рік тому

    bro can you merge this with mongodb database

  • @himanshuyadav0600
    @himanshuyadav0600 3 місяці тому

    case insensitive sorting?

  • @jerefd7491
    @jerefd7491 Рік тому

    bro use "let sort = req.query.sort || "rating"; " so how can it sort by year ? How can I get the year and the rating at the same time, sir?

  • @bunny.rider69
    @bunny.rider69 10 місяців тому

    bhai hindi me bhi banao na

  • @alamjamal4011
    @alamjamal4011 Рік тому

    Frontend code??

  • @rakeshkumarparida98
    @rakeshkumarparida98 11 місяців тому

    Which theme you are using