Skip to content

JacksonTai/url-shortener

Repository files navigation

URL Shortener

The URL Shortener application is a web-based service designed to help users generate short and shareable URLs from longer links. In addition to providing shortened URLs, the application also tracks usage statistics, such as the number of clicks, originating geolocation, and timestamp for each visit to a short URL.

1. Installation Guide

Follow these steps to install and run the URL Shortener application:

Prerequisites

Steps

  1. Clone the repository into local machine using the following git command:

    git clone https://github.com/JacksonTai/url-shortener.git
    
  2. Change directory to url-shortener and install the dependencies (Gem):

    cd url-shortener
    bundle install
    
  3. Setup the database creation and migration using the following rails commands separately:

    rails db:create
    
    rails db:migrate
    
  4. Start the web server using the following rails command:

    rails server
    

2. Dependencies

The URL Shortener application relies on the following dependencies (Gem):

3. Running Test Suite

The test suite includes test cases for models, run the test suite using the following command:

rspec models

This command will run all tests for models using the rspec-rails and display the test results in the terminal.