LongAssLink is a simple link shortener web application written in Rust. It uses the Rocket web framework for building the server and leverages Docker for development and deployment. The project also includes a submodule containing a React-based frontend app at frontend/
that generates static files (output dir: public/
) for the Rust server to serve.
- Shorten long URLs with ease
- Dockerized development environment (separate Dockerfile + compose.yaml for deployment)
- React-based frontend for a user-friendly interface
-
Make sure you have Docker Compose installed.
-
Clone the repository:
git clone https://github.com/LongAssLink/server.git long-ass-link
-
Navigate to the project directory:
cd long-ass-link
-
Run the development environment using Docker Compose:
docker-compose up
This will start the Rust server and the React frontend.
-
Access the application at http://localhost:9000.
The process should be explained in the README.md
file located in the frontend submodule. But it boils down to:
-
Navigate to the frontend directory:
cd frontend
-
Make sure dependencies are installed:
yarn
-
Run the build task:
yarn build --emptyOutDir
This should replace the contents of the public/
directory with the new frontend bundle.
-
Build the Docker image using the provided Dockerfile:
docker build -t long-ass-link -f _docker/Dockerfile .
-
Push a the image to Docker Hub.
-
Update the deployment
The configuration for the Rocket web framework can be modified in the Rocket.toml
file, some values like the databases are injected through environment variables in the production environment.
- Rocket - Web framework for Rust
- sqlx - Async, pure Rust SQL crate
- nanoid - A tiny URL-friendly unique string ID generator
Feel free to contribute to the development of LongAssLink! Create issues, submit pull requests, or provide suggestions.
This project is licensed under the GNU General Public License (3.0 or later) - see the LICENSE file for details.