Skip to content

muadong200474/url-shorten

Repository files navigation

This is about shorten url

Run Docker in root folder

docker-compose down -v
docker-compose up -d

Localhost

Management http://localhost:8081

Redirection http://localhost:8082

Testing

  1. Create short url
curl -d '{"realUrl":"https://google.com"}' -H 'Content-Type: application/json' http://localhost:8081/

Result:
{"id":2,"realUrl":"https://dantri.com.vn","updatedAt":"2022-10-24T13:25:06.802Z","createdAt":"2022-10-24T13:25:06.802Z","shortUrlHash":"LdzbdG","shortUrl":"http://localhost:8082/LdzbdG"}
  1. Delete short url
curl -X DELETE http://localhost:8081/1

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published