docker-compose build
docker-compose up mariadb
# Once mariadb says it's ready for connections, you can use ctrl + c to stop it
docker-compose run short-app rails db:migrate
docker-compose -f docker-compose-test.yml build
docker-compose run short-app rails db:migrate
docker-compose -f docker-compose-test.yml run short-app-rspec rails db:test:prepare
docker-compose -f docker-compose-test.yml run short-app-rspec
docker-compose up
curl -X POST -d "full_url=https://google.com" http://localhost:3000/short_urls.json
curl localhost:3000
curl -I localhost:3000/abc
- The Algorithm that was implemented converts the id of the ShortUrl object into a Base62 short_code
- References: https://en.wikipedia.org/wiki/URL_shortening#Techniques