Skip to content

RNR1/url-shortener

Repository files navigation

URL Shortener

A URL Shortener Generator API, including URL generator, redirect, and visitor statistics.

Table of Contents

Links

Tech stack

Installation

Prerequisites

  • VScode (extensions): Python (nice to have: cSpell for spell-checking).
  • Have PostgreSQL installed and running (can also run over docker).
  • Nice to have: you should have PgAdmin for a better DB management (can run on docker extensions).

Steps

  • Clone this repository

  • Create a virtual environment and install dependencies:

python3 -m venv venv
# $ Mac: source venv/bin/activate
# $ Windows: source venv/Scripts/activate
pip install --upgrade pip
pip install -r requirements.txt
  • Create a fresh .env file from the .example.env for storing the local environment variables:
cp .example.env .env
  • In .env, You should fill the database credentials, and AWS Credentials.

  • Run migrations:

python manage.py migrate
  • Collect static files:
python manage.py collectstatic
  • Start the app:
python manage.py runserver
  • The server will listen on port 8000

Swagger

This app ships with an OpenAPI compliant Swagger page, you can access it locally by visiting: http://localhost:8000/swagger

Style Guides

Contribution

  • After staging your changes, you should create a commit message according to the commit style guidelines (provided by Angular).
  • Push your changes to a new branch, and compare it to the main branch.

Deployment

This application is configured for continuous delivery to AWS EC2 using GitHub Actions and AWS System Manager.

Infrastructure

Infrastructure Chart

About

A URL shortener API created with Django

Topics

Resources

Stars

Watchers

Forks

Contributors 2

  •  
  •