To get a local copy up and running follow these simple example steps.
- Docker - an open platform for developing, shipping, and running applications.
- Clone the repo
git clone https://github.com/dphong1995/shorten_url.git
- Start containers
docker-compose up
Access the Frontend application by using http://localhost:3003
- Start containers
docker-compose up
- Prepare test db
docker-compose exec be rails db:reset db:prepare RAILS_ENV=test
- Run test
docker-compose exec be rails test
- In case there are too many existing URLs and the system cannot generate a unique 6-characters token anymore due to
duplication, we can increase the token length by setting
TOKEN_LENGTH
variable.