Skip to content

dphong1995/shorten_url

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shorten URL


View Demo · Report Bug

Getting Started

To get a local copy up and running follow these simple example steps.

Prerequisites

Start server

  1. Clone the repo
    git clone https://github.com/dphong1995/shorten_url.git
  2. Start containers
    docker-compose up

Access the Frontend application by using http://localhost:3003

Run Test

  1. Start containers
    docker-compose up
  2. Prepare test db
     docker-compose exec be rails db:reset db:prepare RAILS_ENV=test
  3. Run test
    docker-compose exec be rails test

Scalability

  • 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.