Тёмный

Server Side Pagination, Front End Implementation - NodeJS, MySQL & EJS 

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

In this video, you will learn how to create a paginated list, where all of the pagination work is done on the back-end, using Nodejs and the front-end simply renders out the results and links, using EJS. For this project, we have stored all of our data in a MySQL database. The database in question, is going to store thousands of rows, because we want our pagination feature to be designed in a certain way that suits a large data-set like the one that we are using.
The pagination style is unique because it always displays 10 paginated links at a time, instead of the more than 100 links that will in turn, take us to each paginated page. When we visit a new paginated page, the paginated links will change to reflect the pages that are closest to the one that we are currently on. And the position of these links will position themselves around the current page, so that things are always even.
As for the pagination effect itself, that will be achieved with query parameters. We will have a page query parameter which will hold a number, and its number will determine the page we are currently on. We will also be rendering out 30 results per page. Although, this number can be easily changed on the back-end.
📚 Materials/References:
- Completed project’s GitHub repository: github.com/lukechopper/NodeJS...
🧠 Concepts Covered:
- MySQL client in NodeJS.
- Using a loop to render out content in EJS.
- SQL’s LIMIT command.
- Query parameters and redirects in Nodejs.
💻 Technologies used:
- NodeJS.
- EJS.
- MySQL.
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

Наука

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

 

29 июн 2021

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 17   
@philipparker113
@philipparker113 Год назад
This is exactly what I was looking for
@jeremiasobiangcoding3533
@jeremiasobiangcoding3533 2 года назад
nice job got so much done thanks for your help
@strutyk.888
@strutyk.888 2 года назад
I figured out the error - res.render should be in a separate block, in our case, in the block else :) Thank you for the useful lesson!
@msms2389
@msms2389 2 года назад
Hi, can u please update here few lines so that I can understand where to make necessary changes
@nikka13131
@nikka13131 Год назад
thanks for well explained tutorial
@fluffymuzzy
@fluffymuzzy 2 года назад
Thank u very much dude!
@Jonesgoful
@Jonesgoful Год назад
Thank you very much boy! nice
@ncv-nocopyrightvideos4475
@ncv-nocopyrightvideos4475 2 года назад
Bro you are real god❣❣
@pritamkumar3273
@pritamkumar3273 2 года назад
nice work...
@mikelawrencesk8
@mikelawrencesk8 Год назад
my boss thanks you
@yagnadeep5512
@yagnadeep5512 2 года назад
thank you so much bro
@omeatai
@omeatai Год назад
Thanks!
@codingtodev
@codingtodev Год назад
Thanks man
@djeragon6544
@djeragon6544 Год назад
really nice work love this video, but can you please show us how can I implement this with no mysql or database just an array?
@strutyk.888
@strutyk.888 2 года назад
after res.redirect('/?page='+encodeURIComponent(numberOfPages)); Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client. How to correct redirect without errors?
@renesalvacion2452
@renesalvacion2452 2 года назад
page not defined error
@thankyou609
@thankyou609 2 года назад
16:28
Далее
AJAX Live Data Search Using Nodejs MongoDB Express
18:39
You’re Probably Doing Pagination Wrong
6:34
Просмотров 4,5 тыс.
СПАЛИЛА МАМЕ СТАРШУЮ СЕСТРУ
00:23
ЗАМУРОВАННЫЙ ФОКУСНИК
00:44
Просмотров 47 тыс.
D3 BMW XM LABEL Король.
31:52
Просмотров 646 тыс.
Express - Pagination with Sequelize
22:56
Просмотров 15 тыс.
Node.js Express EJS Layouts and Partials Tutorial
28:25
#1 KRAKEN in RAID SHADOW LEGENDS | 100M PLAYER POWER
10:33
Passing Data Between Frontend and Backend | Node.js
18:31
Pagination in MySQL - offset vs. cursor
13:20
Просмотров 55 тыс.
the secret part of sveltekit's data flow
7:03
Choose a phone for your mom
0:20
Просмотров 7 млн