Please checkout my URL shortener! Any feedback is appreciated.
I could have made the short URL shorter but I tried to stick to the user stories exactly which say:
- I can POST a URL to
[project_url]/api/shorturl/newand I will receive a shortened URL in the JSON response.
- If I pass an invalid URL that doesn’t follow the
http(s)://www.example.com(/more/routes)format, the JSON response will contain an error like
I tried to make it well rounded since the overall project is small.
It has some responsiveness, it should work on IE and Edge thanks to some pre-written polyfills I used and bundled into the frontend with parcel.
You can preview the original URL from the short URL by appending
/p to the end of the short URL.
I chose to use SQLite instead of Mongo since I’ve been learning and wanting to work with SQL over MongoDB or other non-relational databases.
I use parcel to bundle the frontend which minify, compile ES6 to JS that has wider compatibility, and I have it auto add some vendor prefixes in the CSS.
You can set it up to use SASS which I thought about for just the ability to use rem and have it auto add px fallbacks but kind of got lazy with that, maybe later or next time. There is some inconsistency in my CSS with using px sometimes and rem sometimes.