Extracted from this repl, based on tutorial Create Pagination with Node.js, MongoDB, Express and EJS Step by Step from Scratch.
- Clone the repository.
- Install all packages.
- Start the app.
- Visit: http://localhost:3000
- Click "Generate Fake Data"
Front page:
Pagination Example:
Furthermore the following changes have been done for personal choice, See this commit for a less destructive code.
- Add readme
- Updated all package versions
- Added nodemon as devDependency
- Added .gitignore
- Added .prettierrc
- Formatted using prettier on vscode
- Adjusted image min-height
- Added
prev
andnext
pagination - Use local bootstrap
- Replace remote image with random qr code to avoid bandwidth wastage
- Add
/remove-products
which removes all products from database generate-fake-data
redirects to/products/1