Тёмный

AJAX Live Data Search Using Nodejs MongoDB Express 

Qixotl LFC
Подписаться 1,7 тыс.
Просмотров 22 тыс.
50% 1

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

Наука

Опубликовано:

 

1 июл 2021

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 30   
@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 2 года назад
Great video my friend, I really wanted to learn how to implement this functionality.
@m.munthasir8573
@m.munthasir8573 2 года назад
Great video mate
@bernardchu2754
@bernardchu2754 3 года назад
Good job Luke !
@darshanajayarathna9396
@darshanajayarathna9396 2 года назад
Very usefull. Thank you!
@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"
@stroverbg
@stroverbg 2 года назад
Nice video! And I need some help. Can you tell me how to do that, but with nested data?
@frenkiewang
@frenkiewang 2 года назад
Hello, do you have the source code, could you please share with your Github account?
@jinayshah7088
@jinayshah7088 2 года назад
Is it working fine with ejs file? I can't able to get data in ejs file.
@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)
@next_codes
@next_codes 2 года назад
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
@user-fq4pc7fm2z
@user-fq4pc7fm2z 2 года назад
thanks! very usefull
@jasminibrahim3377
@jasminibrahim3377 2 года назад
Great Jobs
@leehom2442
@leehom2442 7 месяцев назад
Why the code didn’t work even I copied all the code? the search bar only show “sorry.nothing found”.Mongoose is already connected
@jingfenghuang7169
@jingfenghuang7169 2 года назад
Thank you!
@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.'
@QuadDrums
@QuadDrums 2 года назад
Nice intro bro, I see you 😂
@georgiivanov9485
@georgiivanov9485 2 года назад
The regex thing is not working tho...
@amirmohseninia2576
@amirmohseninia2576 2 года назад
thanks a lot can you give github code?
@ksprdk
@ksprdk 2 года назад
Great video. I'm still a beginner, but can you explain why the request is Post and noget Get?
@hamzaseif4992
@hamzaseif4992 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 2 года назад
@@hamzaseif4992 Makes sense, thanks! :)
@next_codes
@next_codes 2 года назад
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 Год назад
@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!
@carolcourtney772
@carolcourtney772 3 года назад
👍
@yashdubey1505
@yashdubey1505 2 года назад
how to handle if someone is searching a sentence
@yashdubey1505
@yashdubey1505 Год назад
@Kawaii chan no
@kartikeyjangir6003
@kartikeyjangir6003 2 года назад
But how to select the result 🤔 ,it is only showing I want to select them also
@andrewliu1191
@andrewliu1191 Год назад
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.
@IGIRIIS
@IGIRIIS 2 года назад
Very usefull , thank you !!!
Далее
Connecting NodeJS with MongoDB | Mongoose + Express
19:18
Getting Started with MongoDB
8:01
Просмотров 51 тыс.
POST Form Data as JSON with Fetch API in JavaScript
9:25
Rest API - Best Practices - Design
15:50
Просмотров 101 тыс.
Vite Crash Course | Faster Alternative To CRA
16:24
Просмотров 192 тыс.
Database Indexing for Dumb Developers
15:59
Просмотров 47 тыс.