URL shortener application which is written in JavaScript using Express and MongoDB.
The application has next routes:
Response
Returns index.html file.
Parameters
Name | Required | Type | Description |
---|---|---|---|
url | required | string | The URL to be shortened. |
Response
{
"shortUrl": "http://localhost:3000/b"
}
Parameters
Name | Required | Type | Description |
---|---|---|---|
encodedId | required | string | The URL id returned in the response from the /api/shorten API endpoint. |
Response
Redirects to the URL.