A URL Shortener Generator API, including URL generator, redirect, and visitor statistics.
- 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).
-
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
This app ships with an OpenAPI compliant Swagger page, you can access it locally by visiting: http://localhost:8000/swagger
- Commit Message Format: Angular commit message format.
- 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.
This application is configured for continuous delivery to AWS EC2 using GitHub Actions and AWS System Manager.