Skip to content

Repository files navigation

Shorty

URL shortener application built with Django and PostgreSQL.

Installation Guide

Follow steps to install locally.

  1. Prerequisites Python 3.8+ PostgreSQL Git

  2. Clone Repository

git clone <repo-url>
cd url_shortener_project
  1. Setup Database
sudo -iu postgres psql
CREATE USER your_db_user WITH PASSWORD 'password123';
CREATE DATABASE shortener_db OWNER your_db_user;
\q
  1. Configure Environment Variables
cp .env.example .env

open the .env file and set the following variables:

SECRET_KEY='generate-a-strong-random-key-here' DEBUG=True DATABASE_URL='postgres://your_db_user:your_password@localhost:5432/shortener_db'

  1. Setup Virtual Environment
python -m venv venv
source venv/bin/activate
  1. Install Dependencies
pip install -r requirements.txt
  1. Run Database Migrations
python manage.py migrate
  1. Create Superuser (Optional) For django admin panel
python manage.py createsuperuser
  1. Run Development Server
python manage.py runserver

Visit http://127.0.0.1:8000/.

About

URL Shortener

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages