Self hosted web app for shortening urls (URL shortener)
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Go to file
James Mills f9a08c21ca
Fix import paths
2 years ago
static Add copy to clipboard button via clipboard.js 6 years ago
templates Moved database to Bitcask (#22) 2 years ago
.drone.yml Changed URL format to shortuuid (#21) 2 years ago
.gitignore Moved database to Bitcask (#22) 2 years ago
.goreleaser.yml Add goreleaser config 4 years ago
Dockerfile Fixing Expose Port in Dockerfile 5 years ago
LICENSE Fixed LICENSE 6 years ago
Makefile Fixed coverage collection 4 years ago
README.md Fix import paths 2 years ago
_config.yml Set theme jekyll-theme-hacker 4 years ago
config.go Fix import paths 2 years ago
config_test.go Added an index of all urls 6 years ago
go.mod Fix import paths 2 years ago
go.sum Fix import paths 2 years ago
main.go Fix import paths 2 years ago
main_test.go Fix import paths 2 years ago
models.go Fix import paths 2 years ago
models_test.go Fix import paths 2 years ago
server.go Moved database to Bitcask (#22) 2 years ago
templates.go Refactored. New UI Design 6 years ago
urls.db Fix import paths 2 years ago
version.go Bump version v0.1.0 6 years ago

README.md

shorturl - A self-hosted URL shortener web app and service

Build Status CodeCov Go Report Card GoDoc Sourcegraph

shorturl is a web app that allows you to create short urls of much longer more complex urls for easier sharing or embedding.

Installation

Source

Due to the necessity of the way assets are handled if you are building/installing from source and intend to run outside of the source tree you need to do something like this:

$ go get github.com/GeertJohan/go.rice/rice
$ go get git.mills.io/prologic/shorturl
$ cd $GOPATH/src/git.mills.io/prologic/shorturl
$ rice embed-go
$ go build

Usage

Run shorturl:

$ shorturl

Then visit: http://localhost:8000/

Configuration

By default shorturl stores urls in db subdirectory of the local directory. This can be configured with the -dbpath /path/to/db/ option.

shorturl also displays an absolute url after creating and uses the value of -baseurl (default: "") for display purposes. This is useful for copying and pasting the shorturl.

Data Storage

Data is currently stored in a Bitcask key/value store configured via the -dbpath option.

License

MIT