A very performant and light (2mb in memory) link shortener and tracker. Written in Rust and React and uses Postgres/SQLite.
1# SimpleLink 2A very performant and light (6mb in memory) link shortener and tracker. Written in Rust and React and uses Postgres. 3 4![MainView](readme_img/mainview.jpg) 5 6![StatsView](readme_img/statview.jpg) 7 8## Build 9 10### From Source 11First configure .env.example and save it to .env 12 13If DATABASE_URL is set, it will connect to a Postgres DB. If blank, it will use an sqlite db in /data 14 15```bash 16#set api-domain to where you will be deploying the link shortener, eg: link.example.com, default is localhost:8080 17git clone https://github.com/waveringana/simplelink && cd simplelink 18./build.sh api-domain=localhost:8080 19cargo run 20``` 21 22On an empty database, an admin-setup-token.txt is created as well as pasted into the terminal output. This is needed to make the admin account. 23 24Alternatively if you want a binary form 25```bash 26./build.sh --binary 27``` 28then check /target/release for the binary named `SimpleGit` 29 30### From Docker 31```bash 32docker build --build-arg API_URL=http://localhost:8080 -t simplelink . 33docker run -p 8080:8080 \ 34 -e JWT_SECRET=change-me-in-production \ 35 -v simplelink_data:/data \ 36 simplelink 37``` 38 39### From Docker Compose 40Adjust the included docker-compose.yml to your liking; it includes a postgres config as well.