{"repo":"adhocore/go-urlsh","free":true,"listed":false,"github":"https://github.com/adhocore/go-urlsh","clone":"git clone https://github.com/adhocore/go-urlsh.git","description":"Golang URL shortener and bookmarker service with UI, API, Cache, Hits Counter and forwarder using postgres and redis in backend, bulma in frontend. Think of it as self hosting ready url shortener.","language":"Go","stars":157,"topics":["golang","go","url-shortener","postgres","urlshortener","go-url-shortener","adhocore","self-hosted"],"license":"MIT","category":"self-hosted-apps","readme_excerpt":"urlsh urlsh is URL shortener application built on Go language. It does not use external libraries except the gorm for postgres database and minimal redis module redigo. Usage Web client Just visit the homepage of your urlsh deployment site. You can also integrate API for programmatic usage. Terminal client If you live inside the command line terminal, you can install a client: or, with newer go versions Make sure $GOPATH or $HOME/go/bin is in your $PATH or %path% , then use it like so: Read below for self hosting, API integration and/or contributing to urlsh . Getting source Configuring It should be configured using env variables. Please check .env.example for available variables and explanation. DATABASE URL is always required and is string of the following form: When running urlsh with docker-compose, the preferred way, DATABASE URL is automatically set from POSTGRES variables. Please note that urlsh does not ship with .env loader so to run it in bare metal, one needs to use export KEY=VALUE or source .env manually. If REDIS URL is provided with redis://host:port , then it will cache popular urls, the popularity threshold is hard coded to minimal value in common.constant . The cache will sync when short url is deleted and sometimes when expired. The hit counters will however sync in realtime. Setting up docker To set up dockerized urlsh , run the commands below: After a few seconds, you should be able to browse to localhost:2000. Testing For running tests, APP ENV=test is n","default_branch":null,"files":null,"tree":[],"storefront":"/r/adhocore","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/adhocore/go-urlsh/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}