Skip to content
Self hosted web app for shortening urls (URL shortener)
Go HTML Makefile Dockerfile
Branch: master
Clone or download
Latest commit 9f228cd Sep 1, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
static Add copy to clipboard button via clipboard.js Jul 15, 2017
templates Cleanup index UI view Sep 7, 2017
.drone.yml Migrate to Drone CI, Codecov and Go11Modules Dec 31, 2018
.gitignore Update .gitignore Sep 1, 2017
.goreleaser.yml Add goreleaser config Dec 31, 2018
Dockerfile Fixing Expose Port in Dockerfile Feb 9, 2018
LICENSE Fixed LICENSE Jul 11, 2017
Makefile Fixed coverage collection Dec 31, 2018
README.md
_config.yml Set theme jekyll-theme-hacker Apr 13, 2019
config.go Refactored. New UI Design Jul 9, 2017
config_test.go Added an index of all urls Sep 2, 2017
coverage.txt Fixed coverage collection Dec 31, 2018
go.mod Migrate to Drone CI, Codecov and Go11Modules Dec 31, 2018
go.sum Migrate to Drone CI, Codecov and Go11Modules Dec 31, 2018
main.go Added an index of all urls Sep 2, 2017
models.go Added an index of all urls Sep 2, 2017
models_test.go Added an index of all urls Sep 2, 2017
server.go Added an index of all urls Sep 2, 2017
templates.go Refactored. New UI Design Jul 9, 2017
utils.go Initial Commit Jul 3, 2017
version.go Bump version v0.1.0 Sep 2, 2017

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 github.com/prologic/shorturl
$ cd $GOPATH/src/github.com/prologic/shorturl
$ rice embed-go
$ go build

Usage

Run shorturl:

$ shorturl

Then visit: http://localhost:8000/

Configuration

By default shorturl stores urls in urls.db in the local directory. This can be configured with the -dbpath /path/to/urls.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 Bolt embedded database configured via the -dbpath option.

License

MIT

You can’t perform that action at this time.