AJAX Live Data Search Using Nodejs MongoDB Express

Поділитися
Вставка
  • Опубліковано 30 вер 2024
  • Hey guys, this one is a revamp of one of my older videos. The link to which can be found here: • AJAX - live search. Us...
    This video will teach you how to create a live search in Nodejs, where communication between the server and the client is done through AJAX, so the client never has to refresh their browser.
    The example used in this tutorial is a database that stores some of the most common fruits which the client will be able to search through using the live search bar. The database in question is a MongoDB database because that is the database that is most often coupled with Nodejs. Although, it shouldn’t be too hard to adapt this tutorial into a SQL database such as PostgreSQL.
    I decided to remake one of my older videos because for starters, that video had a pretty low production quality: its text was really small, my explanations where lacking and I used jQuery, a dying ‘framework’ unnecessarily. Well, this video sets to write those wrongs. To begin with, I will be using fetch API which is a much more modern approach to make AJAX requests to a server. I also hope to improve the quality of my explanations and just the overall code that I am writing in general.
    💻 Technologies used:
    - NodeJS.
    - Fetch API.
    - MongoDB.
    If you enjoyed this video then please consider liking 👍 and subscribing. You would be doing me a huge favour if you did this and it would be greatly appreciated ❤️ by me. Likewise, if you have any queries or comments that you want answered. Then please, don’t hesitate post them down into the comments box below. I would love to hear back from you and will answer all of your questions to the best of my ability.
    Stay awesome guys. ❤️
    #webdev#backend#frontend#JavaScript#nodejs#SQL
  • Наука та технологія

КОМЕНТАРІ • 30

  • @frenkiewang
    @frenkiewang 2 роки тому +3

    Hello, do you have the source code, could you please share with your Github account?

  • @next_codes
    @next_codes 3 роки тому +5

    Video Request: Please can you do a video, extending this particular video where instead of rendering the search Result as plain text, use the search Result to filter an existing table

  • @leehom2442
    @leehom2442 10 місяців тому

    Why the code didn’t work even I copied all the code? the search bar only show “sorry.nothing found”.Mongoose is already connected

  • @stroverbg
    @stroverbg 2 роки тому +2

    Nice video! And I need some help. Can you tell me how to do that, but with nested data?

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

    Is it working fine with ejs file? I can't able to get data in ejs file.

  • @next_codes
    @next_codes 3 роки тому +1

    Great Video good delivery, Meanwhile what if in DB you have the following as fruit names,
    Bing Cherry,
    Dragon Fruit,
    Damson Plum,
    Dew Berries,
    Dinosaur Eggs
    Each Fruit has two words Name:
    How would you fetch each fruit by entering the First letter of the second name.
    Eg. C in "Bing Cherry"
    from your tutorial it will return Null, please how can I achieve that ?

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

      @Kawaii chan That's a smart solution! It'll be most ideal if it can search the first letter of each word. i.e. a query of "u" in Mr. Ernest's example should return no match but your solution would return "Damson Plum" since it contains the letter "u". Regardless, it's still better than finding no match!

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

    It's working only for partial search. When I type 'appl' , it is showing 'apple'. But when I type 'apple', it is showing 'Sorry.Nothing found.'

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

    what do I need to change in the match variables when I want to allow the user to use numbers?
    So if I eg. have a name "123 test", I want it to show up when I type "1"

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

    Just found this video. Great tutorial. Is it possible to do it without using mongoose? Im using mysql with local database (xammp)

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

    how to handle if someone is searching a sentence

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

    Good tutorial of a great live data search input. Thank you very much for uploading it, it is very useful.

  • @drip1717
    @drip1717 3 роки тому

    Great video my friend, I really wanted to learn how to implement this functionality.

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

    thanks a lot can you give github code?

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

    Very usefull. Thank you!

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

    The regex thing is not working tho...

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

    Very usefull , thank you !!!

  • @carolcourtney772
    @carolcourtney772 3 роки тому +1

    👍

  • @АлександрСосо-щ1б
    @АлександрСосо-щ1б 2 роки тому

    thanks! very usefull

  • @QuadDrums
    @QuadDrums 3 роки тому

    Nice intro bro, I see you 😂

  • @m.munthasir8573
    @m.munthasir8573 3 роки тому

    Great video mate

  • @bernardchu2754
    @bernardchu2754 3 роки тому

    Good job Luke !

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

    Great Jobs

  • @jingfenghuang7169
    @jingfenghuang7169 3 роки тому

    Thank you!

  • @ksprdk
    @ksprdk 3 роки тому

    Great video. I'm still a beginner, but can you explain why the request is Post and noget Get?

    • @hamzaseif4992
      @hamzaseif4992 3 роки тому +2

      get request will use the query string which can make the url ugly and sometime you dont want anyone to get access to these data

    • @ksprdk
      @ksprdk 3 роки тому

      @@hamzaseif4992 Makes sense, thanks! :)

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

    But how to select the result 🤔 ,it is only showing I want to select them also

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

      Not sure what you mean "select" but you can simply change the content in the tag to make it do what you want it to do. I changed it to tag and pass in the object ids as the href and it'll link to the item's detail page.