This Rails app is an implementation of a bit.ly like url shortener.
Shortened urls are generated using a base62 token strategy, trying to avoid collisions and also reducing the database size. Tokens have 8 characters, which gives us 62^8 possible tokens.
- Ruby 2.7.1
- Rails 6.1.4
- Postgres 12.7
Building api image:
docker-compose build
Setting the database up:
docker-compose run api rake db:create
docker-compose run api rake db:migrate
Running the app:
docker-compose up
Running the specs:
docker-compose run api rspec