/link_shortener

A rudimentary URL shortener for code interview.

Primary LanguagePython

link_shortener

A rudimentary URL shortener for code interview.

Users may want to try it out with this link: https://link-shortener-x4be-master-6vcifd4szq-wm.a.run.app/

The shorten URL records will not be stored long-term.

Setting up virtual environment

To setup a virtual environment,

python3 -m venv /dex_project

You may activate the virtual environment by the command:

source dex_project/bin/activate

and exit it through the following:

deactivate

Installing essential packages

These are the essential packages for this projects:

  • flask
  • pytest
  • sqlite3
  • datetime
  • pytest
  • pytest-cov

Install the necessary python package in your environment

python3 -m pip install flask datetime pytest pytest-cov sqlite3 and random should be preinstalled already.

Using the app

Unzip the file to your home directory.

tar –xvf link_shortener.tar

Move to the working directory.

cd /home/Username/link_shortener

The folder should have the following structure: