URL Shortener - Omni HR Full Stack Assignment #1
- Copy root environment variables. - This is used for running the PostgreSQL through Docker
cp .env.example .env
- Copy backend environment variables
cp ./backend/.env.example ./backend/.env
- Copy frontend environment variables
cp ./frontend/.env.example ./frontend/.env
- Run docker compose - Run production ready services
docker compose up -d
- Run initial backend migration
docker exec -it omnihr-url-shortener-backend-1 python manage.py migrate
-
Open
localhost:3000
in your browser -
(Optional) - Run containers for development
docker compose -f docker-compose.dev.yaml up
If I have more time, I will:
- Add unit tests
- Add caching to Get URL APIs
- Clean database data for expired short URLs
- Measure performance by doing load testing to the APIs
- Fine tune nginx and gunicorn webservers