A Django project for a link shortener.
A Django project for a link shortener.
To run the project, you need to have Python and Node (to run Rspack) installed on your machine, or you can use Docker.
Once the repository is cloned and the global dependencies are installed, you can install the project's local dependencies.
Python dependencies:
pip install -r requirements/local.txt
Node dependencies:
pnpm install
Copy the .envs.example
directory to the .envs
directory (which will be ignored by Git):
cp -r .envs.example .envs
python manage.py migrate
python manage.py createsuperuser
Django application:
python manage.py runserver
Rspack:
pnpm dev
The Python command will start the Django application at http://localhost:8000 and Node will start Rspack and a proxy server for automatic reloading at http://localhost:3000.
Once the repository is cloned, the global dependencies are installed and variables defined, let's start the container:
docker compose -f docker-compose.local.yml up
When started, the container starts the Django application!
The steps below will only be necessary if you have not yet carried out the migrations and created a super user! If you have already done so, the application can be accessed at: http://localhost:3000
You will need to enter the container via CLI:
docker compose -f docker-compose.local.yml up exec django zsh
Now you are inside the container!
You will need to make the migrations:
python manage.py migrate
Creating a super user:
python manage.py createsuperuser
The Python command will start the Django application at http://localhost:8000 and Node will start Rspack and a proxy server for automatic loading at http://localhost:3000.
This project is under the MIT license.