I added search and pagination functions to my website. I also fixed unexpected bugs when deploying such as problems with CORS policy. I fixed this by adding the header and ultimately turning off my laptop for a while.
• The difference between URI parameter (ex: https://thilee.blog/about) and query parameter (ex: https://thilee.blog/search?page=about, and that one I made up). I also learned how to get the http request params or query.
• Instead of finding searched term directly in database, I converted the json got from database to an array and used Array.prototype.match(). With the help of regular expression, I could finally search for what I wanted in a collection of a database.
• Pagination wasn’t hard, but it was tricky. As long as I could passed the total number of records in a database to client, I could set up the number of pages shown on the pagination bar.
• Write a detailed documentation for my restaurant project. I think it is growing and getting out of hand if I don’t have a way to organize in words, human-readable words, about what I do.
• Authorization. Setting up a sign-up and log-in page to check who’s having what kind of authorization over my page. Obviously, it’s not a good idea that anyone can delete or edit what’s in the database. (This comes with security and that makes me groan.)
• Whatever pops up along the way