Skip to content

Unipisa/url-shortener

 
 

Repository files navigation

URL Shortener 🔗

A simple web application built with Node.js, Express, and MongoDB for you to readily get a shortened URL to use

Project First Look

Application Screen Shot in GIF

User Stories

  1. User can input a set of URL aiming to be shortened
  2. User can get a warning message for invalid URL format input
  3. User can get a set of shortened URL from the original URL provided
  4. User can copy the shortened URL to clipboard by clicking the copy button
  5. User can reset the input columns for next URL generation
  6. User can be redirected to the original URL by visiting the shortened URL

Admin Stories

  1. Admin can configure validation of URLS to restrict urls redirections. Eg:
    export URLSHORTENER_URL_REGEXP="^https?://[^/]*.mydomain.com(/.*|)$"
    export URLSHORTENER_URL_ERROR_MESSAGE="url must refer to mydomain.com"

Installation

The following instructions will get you a copy of the project and all the setting needed to run it on your local machine.

Prerequisites

Clone

Clone this repository to your local machine

$ git clone git@github.com:Unipisa/url-shortener.git

Setup

** Install npm packages**

$ npm install

** Start a database server**

$ docker-compose up -d

** Activate the web server**

$ npm run dev

** Wait the message for successful activation**

> mongodb connected!
> App is running: https://localhost:3000

Now you may visit the application on browser at URL: http://localhost:3000


FAQ


Authors

About

A simple web application built with Node.js, Express, and MongoDB for you to readily get a shortened URL to use

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 56.4%
  • Handlebars 32.8%
  • CSS 6.9%
  • Dockerfile 3.8%
  • Procfile 0.1%