Made a URL shortener using MongoDB and Express for fun!

So suppose I as a user want to shorten my website and I save it as and some other user wants to come and shorten their website and they also choose I can only service one of those short urls. So I have to inform whichever user comes second that whatever custom link they wanted is taken.

However, I think the error you’re referring to is when you tried to shorten a link which had already been shortened without a custom shortlink and it would tell you that the URL already exists.

For example, has already been shortened to /mchg93j in the database and you come along and try to shorten without providing a custom shortlink and it gives you this error. I’ve since fixed that error. Let me know if you have any more errors and feel free to submit a pull request!

Author: admin

Leave a Reply

Your email address will not be published.