URL Shortener - API & Microservices Project

Please checkout my URL shortener! Any feedback is appreciated.

https://smll-url.glitch.me/

https://github.com/br3ntor/fcc-smll-url


Thoughts:

I could have made the short URL shorter but I tried to stick to the user stories exactly which say:

  1. I can POST a URL to [project_url]/api/shorturl/new and I will receive a shortened URL in the JSON response.
    Example : {"original_url":"www.google.com","short_url":1}
  2. 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 {"error":"invalid URL"}

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.

It works if someone happens to have JavaScript disabled as well.

You can preview the original URL from the short URL by appending /p to the end of the short URL.
https://smll-url.glitch.me/api/shorturl/d1Rs7/p

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.

1 Like

It looks like it worked, I posted a link to this forum url and the short url worked, nice job