A generic URL shortener project.
The initial business requirements are:
- The link shortener should be able to receive a URL and give back a shortened URL.
- When a user accesses the shortened URL he should be redirected to the full URL.
- It should have an API endpoint where you can query stats around a particular shortened URL giving you details about the users that have visited the URL with as much information as you can get on that person.
This project is built on Rails.
- 💎 Ruby
- 🛤️ Rails
Alternatively, we can use 🐋 docker
and 🐳 docker-compose
.
Assuming that user already have Ruby, we can simply install the application by:
$ bundle install
How to run tests:
$ rails db:test:prepare
$ rails test
How to run the development console:
$ rails c
How to run the development server:
$ rails s
How to prepare (create and migrate) DB:
$ rails db:migrate