Sign inSign up

makkes/shorty

By makkes

•Updated over 7 years ago

A very simple URL shortener with an even simpler UI.

Image
0

10K+

makkes/shorty repository overview

⁠Shorty

Build Status

A very simple URL shortener with an even simpler UI.

⁠Installation

To install Shorty, you have 3 options:

  1. Install using Go:
    go get github.com/makkes/shorty
    
    Then you can just run shorty (see below for runtime parameters).
  2. Grab the binary of the most current release⁠.
  3. Get the Docker image:
    docker pull makkes/shorty:VERSION
    
    VERSION is either latest or a release number such as v1.1.0.

⁠Configuration/Persistence

The startup configuration of Shorty is provided via environment variables:

VariableDescriptionDefault
LISTEN_HOSTThe IP address/hostname to listen onlocalhost
LISTEN_PORTThe port to listen on3002
SERVE_HOSTThe host used by users to reach Shortylocalhost
SERVE_PROTOCOLOne of http or httpshttps
BACKENDThe persistence backend to use, one of bolt, dynamodbbolt

Shorty provides two persistence mechanisms: A Bolt database, persisting all data in a single database file and a DynamoDB backend, storing all data in an AWS DynamoDB table.

⁠Bolt Backend Configuration
VariableDescriptionDefault
DB_DIRThe directory used to store Shorty's database filesthe current directory

When you choose the Bolt backend, you don't need to setup a database server. However, this implies that you cannot distribute Shorty onto multiple nodes.

⁠DynamoDB Backend Configuration

The DynamoDB backend is configured via standard AWS environment variables; see https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html?shortFooter=true⁠ for an explanation.

⁠License

This software is distributed under the BSD 2-Clause License, see LICENSE⁠ for more information.

Tag summary

Content type

Image

Digest

Size

8.7 MB

Last updated

over 7 years ago

docker pull makkes/shorty