URL shortener with EJS and MongoDB 2023 March
Summary
- Refreshed my knowledge on how to use MongoDB, Express, and EJS
- Learned how to implement a copy to clipboard button functionality
- Demonstrated that my frontend skills have not faded despite being busy with university responsibilities
Description
This is a project I've done for the purpose of refreshing my memory on how to code in the backend . As I used to learn all about the backend in MongoDB, hence, I utilized Express and EJS for this project. Below is a screenshot of the project. It has a simple frontend design that is simple and aesthetic enough (and it's in dark mode, which is my favourite).
Instruction
- Go to https://kind-ruby-bee-coat.cyclic.app
- Click on any preexisting links to quickly test the shortened links' functionality. You can also copy the links through clicking the "Copy It!" button. You will be alerted that the link has been copied.
- You may also insert a link yourself so as to shorten it. The table will then reflect the new additions of the link. You can then copy and test whether it works.
Please take note that as I'm using a free hosting website thus my link, once copied, is not short at all. For example, the shortened link's short id is AmrlPOxX-, however, due to me hosting the project on a free hosting server, hence, it looks like this instead: https://kind-ruby-bee-coat.cyclic.app/AmrlPOxX-, which is not short at all.
The only way for me to generate a true short link without utilizing third APIs like bitly is to purchase a domain that is short with very few letters. However, this project is for learning purposes and hence I will not be purchasing a short domain.