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
Bitjective functions are a type of function that work in both directions.
i.e. f(a) = 1 & f(1) = a
An in-depth explanation of how exactly bitjective functions operate may be found here: https://stackoverflow.com/questions/742013/how-do-i-create-a-url-shortener/742047#742047