URL Shortner java spring application.
- nginx frontend
- Spring Boot Backend
- Spring Web
- Spring Redis
- Spring Data MySQL
- Redis Cache
- MySQL Galera Database
mvn clean package
make up
docker-compose up -f docker/docker-compose.yml
docker-compose -f docker/docker-compose.yml up --scale usho=2
make down
docker-compose down -f docker/docker-compose.yml
make up
make down
Service runs behind nginx proxying to spring boot container usho
Access http://localhost:4000/swagger-ui.html
make usho
curl -X POST "http://localhost:4000/usho" \
-H "accept: application/json" \
-H "Content-Type: application/json" \
-d "http://www.google.com"
Response
{"id":"ailjoN","longURL":"http://www.google.com"}
http://localhost:4000/usho/ailjoN
curl -X DELETE http://localhost:4000/usho/ailjoN
Confirm again on the browser, accessing URL should return 404.