Let’s discuss your "URL Shortener Microservice"

Let’s discuss your "URL Shortener Microservice"


Greetings, Fellow Campers!
This topic is for listing and review of URL Shortener Microservice Complete projects built as a part of FCC challenges.

  • Post reviews as a specific reply to the link which you are reviewing.


Project Link => https://url-shortener-amk.herokuapp.com/
Source Code => https://github.com/AungMyoKyaw/URL_Shortener


Project Link – > https://brusbilis.com/freecodecamp/v1/apis/url/url.html

Source Code – > https://github.com/brusbilis/freeCodeCamp/tree/master/v1/back-end/apis


Hi, Brusbills. I tried example creation in your website, it can give me a json response, but the shortURL in it doesn’t redirect me to my original url.

I found inconsistent behavior of this, this morning it redirects to https://brusbilis.com/www.freecodecamp.com
I think it may be the reason of base url.

This afternoon, the shortURL just give me a 404 not found.

Didn’t go to your source code for check, not sure the reason.


View my project: https://url-shortcut.herokuapp.com/

Source Code: https://github.com/AsimoLoveGym/URL-Shortener-Microservice

In case it may help someone, I use Regexp pattern for URL validation. I tried to use redirect HTTP response status code for validation, but it’s neve gonna be an easy way. http://stackoverflow.com/questions/8188645/javascript-regex-to-match-a-url-in-a-field-of-text

I have hard coded some original_urls - short_urls pairs in my server side js. But since no database applied here, the short_urls will lose when site exit.


Thanks a lot for the feedback.

I hope is fixed now. The problem is a very strange behavior with req.url.
In local development req.url works Ok, but in the server only gets one “/” instead of the two after the protocol, so i implement a manual hack.


Live project link
GitHub source code

Happy to hear any opinions, comments, suggestions, etc. :slight_smile:


Heroku: https://shrtn-me.herokuapp.com/
Github: https://github.com/Zooll8/url-shortener

Created this project with NodeJS + Express+ mondoDB. Hope My source code will help somebody if they will stuck somewhere


Heroku: https://url-shortener0.herokuapp.com/
GitHub: https://github.com/Luiko/url-shortener-microservice


Heroku: https://url-shortener-me.herokuapp.com/
Github: https://github.com/Faizahmadfaiz/Url-Shortener


Heroku: https://fcc-short-url.herokuapp.com
Github: https://github.com/CronoxAU/FCC-url-shortener-service

I really enjoyed this challange, getting to use MongoDB in a project was great fun. I ended up getting a bit stuck with deployment due to both mongoDB and npm issues but in the ended learned a lot about both getting them working correctly at heroku.

It really renforced for me that learning by making actual projects is a huge benifit over just doing little self contained challanges.



I added ‘/show_all’ as a route so a user can see all the urls that have been shortened. It’s not a practical feature but was fun to add.


Here’s my:

github repo

This one drove me a little nuts. After a whole day of searching for what seemed like the simplest thing to do, I never did figure out how to drop an existing collection when loading the app. Right now I’m using the mLab interface, robomongo, or command line to drop collections manually.


Hello! Here is my project, any feedbacks are welcome. Thank you.



Source Code

live demo


Heroku: URL Shortener
Github: https://github.com/Renestl/url-shortener

This was really challenging with weird errors popping up and during the deployment to Heroku with using mLab. I did enjoy working with the database though!



I’ve finished my url shortener microservice.

Can you take it for a spin and tell me what you think?

live app: https://url-shrt-zelite.herokuapp.com/
code: https://github.com/zelite/url-shortener

This was a challenging one. I got a bit confused with all the callbacks. express needs callbacks, mongodb driver needs callbacks, aaaaahh… callback hell.

When a user want to create a new url, I make a call to the Google Safe Browsing API and only create a short url if the url is safe. Then i store the url in the mongodb. If a user tries to create a short url to an already existing url, I simply return the already created short url.


Url shortener should accept urls with queries and subdomains right ? What is the purpose of an url shortener that only shorten the hostname ?


Hey guys!

Here is my app
Heroku: https://limitless-mesa-41849.herokuapp.com/
Gitlab: https://gitlab.com/jakimenko/url-shortener

Main issues I see so far:

  1. Overkill with the way how I pick the last number from the db
  2. How to manage mongoose disconnect / close properly?

I will appreciate any thoughts on how my solution could be improved and refactored


Looks good.

  1. I would not recommend using the number of links in your db as the “short”. What if one them got deleted? I would suggest using the time+date to generate this number.
  2. Mongoose will handle the connection, so you don’t need to worry about closing the connection.