docker-compose down -v
docker-compose up -d
Management http://localhost:8081
Redirection http://localhost:8082
- 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"}
- Delete short url
curl -X DELETE http://localhost:8081/1