My implementation of the URL shortener micro-service

Hi fellow campers!

Here are the link to my project, and any feedback is super appreciated!

Github: https://github.com/user883311/url-shortener-microservice
Live project: https://url-shortener-883311.herokuapp.com/

I’ve used Express for this project, as well as Joi for input validation.

Thanks,
Ed

Right so you did not provide instructions on how it works.:face_with_raised_eyebrow:
I had to look in your code to find out.
If I put an invalid number in https://url-shortener-883311.herokuapp.com/6656 it gives “internal server error”.
If I try to go to a saved link: https://url-shortener-883311.herokuapp.com/21
It takes me to the JSON for that link (it does not redirect).
A couple of links I tried did not save.

1 Like

Thanks Johnny that is a lot of useful comments… I’ll make changes and test again.
Regarding the internal error it was designed this way on purpose. I should rather return a JSON object with an error message in it.

Thanks again

1 Like