quicklink

command module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 9, 2022 License: MIT Imports: 8 Imported by: 0

README

An ultra-simple redirect service.

image

Usage

The root URL (default is http://localhost:8080) has a form that lets you add a link and a destination.

For example, if you add a link to google and a destination of https://google.com, then you can access http://localhost:8080/google and it will redirect you to https://google.com.

Local Service

Ideally, it should run on port 80 on a short hostname (e.g., ql as in ql/mylink), but you can run it on any port and any hostname.

Installation

Using go install:

go install github.com/mastercactapus/quicklink@latest

By default, it will use an in-memory data store. You can also use a .txt file, or a Postgres DB (it will create its table the first time it connects).

$ > quicklink -h
Usage of quicklink:
  -addr string
    	http service address (default ":8080")
  -pg string
    	postgres connection string
  -txt string
    	text file to use for persistence

Development

Requires Go >= 1.19.

To start the server for development run make start and then visit http://localhost:8080 To build run make, the binary will be in ./build/bin/quicklink

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
web
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL