This application allows to converts long URLs into shorter, more readable links, making them easier to share:
- It uses Redis as cache.
- It uses MongoDB as database.
- It uses Nginx as a load balancer, and a reverse proxy for the server.
- The application is containerized by Docker.
Client | Server | Cache | Database |
---|---|---|---|
React | ElysiaJS (Bun) | Redis | MongoDB |
RTK Query | Mongoose | ||
Material UI |
- Clone project
git clone https://github.com/JoanRoucoux/react-elysia-url-shortener-app
- Navigate to the project directory
cd react-elysia-url-shortener-app
- Create a .env file
MONGODB_USER=user
MONGODB_PASSWORD=pass
MONGODB_DATABASE=urls
MONGODB_HOST=mongo
MONGODB_LOCAL_PORT=27017
MONGODB_DOCKER_PORT=27017
REDIS_HOST=redis
REDIS_LOCAL_PORT=6379
REDIS_DOCKER_PORT=6379
BUN_LOCAL_PORT=8080
BUN_DOCKER_PORT=8080
NGINX_HOST=localhost
NGINX_LOCAL_PORT=3030
NGINX_DOCKER_PORT=80
VITE_APP_LOCAL_PORT=5173
VITE_APP_DOCKER_PORT=5173
VITE_API_BASE_URL=http://${NGINX_HOST}:${NGINX_LOCAL_PORT}/api/v1
- Start the containers with docker compose
docker compose up --build
- Enjoy 😊