URL Shortener Microservice Back End

Hey everyone. Can anyone help me with this please? Im struggling with this:

You can POST a URL to /api/shorturl and get a JSON response with original_url and short_url properties. Here’s an example: { original_url : 'https://freeCodeCamp.org', short_url : 1}

When you visit /api/shorturl/<short_url> , you will be redirected to the original URL.

Hope someone can help me. I really need to passed this projects. Thanks in advance.

solution: https://replit.com/@angelikadomingo/boilerplate-project-urlshortener-3

Link to the challenge:

It might or might not be relevant, but your regex is too simple for the app.
e.g. http://www.yahoo.maniac yields {} instead of error

In each routes, you can put a console.log of inputs (uri) and outputs, thus when the test specs are running you can see what kind of strings input by the test specs and what’s your output so you can see the discrepancies and what to work on.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.