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