A url shortener using the CRC32 hashing algorithm and the following tech stack:
- Kotlin
- Spring Boot
- MongoDB
- Docker
- Kubernetes
This app isn't production ready:
- it only works on localhost
- test coverage is low
- ...
- start database(s)
docker-compose up - Interact with docker
docker exec --tty --interactive <container> <program>- MongoDB Shell
mongosh
- MongoDB Shell
- start server: with IntelliJ or
./gradlew bootRun
use urlsdb.urls.find()
- add a url
./scripts/createUrl.sh "8081" "https://www.learnitmyway.com" - paste url in response in browser and get redirected
- start Kubernetes cluster with Docker Desktop
- build jar, build docker image and push to docker hub:
./scripts/build-and-push.sh - deploy everything
kubectl apply -f k8s
- ip address of url-service is
localhost:30081