URL Shortener in TypeScript
Receive a URL and return a short version.
Express API running on port 3333
Docker compose file included
- Remember to change the host to "mongo" in the ormconfig.json file
- Remember to change the host to "localhost" in the ormconfig.json file
{
"url": "https://ww.google.com"
}
{
"shortUrl": "http://tier.app/-l0nZM-lm"
}
http://localhost:3333/api/v1/?url=http://tier.app/-l0nZM-lm
http://localhost:3333/api/v1/?url=http%3A%2F%2Ftier.app%2F-l0nZM-lm
{
"originalUrl": "https://www.google.com/"
}
I also add a exported file to be imported on Insomnia
Fell free to play and improve it