Skip to content

http.Handler that forwards paths to other URLs (similar to Bitly)

Notifications You must be signed in to change notification settings

DreamLineLove/URLShortener

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

URL Shortener

A program written in Go that forwards paths to other URLs (similar to Bitly)

Usage

  • First, clone the repository to your local machine:
    $ git clone https://github.com/DreamLineLove/URLShortener.git
    // The following each runs the binary with default flags
    // Run the one for your operating system
    $ ./bin/apple-silicon-mac
    $ ./bin/intel-mac
    $ ./bin/windows
    $ ./bin/linux

    // Or build the binary yourself
    $ go build .

Flags

  • By default -path is "redirect.yml".
  • However, you can set the flags anyway you like:
    // The data source is set as "mydata.json" from the same directory
    // It is run on a Linux machine
    $ ./bin/linux -path mydata.json
  • Both ".json" and ".yml" file extensions are supported.

About

http.Handler that forwards paths to other URLs (similar to Bitly)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published