shortie

command module
v0.0.0-...-553f44b Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2023 License: GPL-3.0 Imports: 31 Imported by: 0

README

shortie

A simple link shortener with support for several storage backends

Works out of the box with no external database or configuration however configuring it is extremely beneficial

Supported backends

  • vedis - A networkless redis, similar to sqlite
  • redis - Traditional redis
  • mongo - You guessed it, mongo
  • boltdb - boltdb :D

Quick start

  1. go get github.com/freman/shortie
  2. rm ./bin/shortie
  3. go get github.com/GeertJohan/go.rice/rice
  4. ./bin/rice --import-path=github.com/freman/shortie embed-go
  5. go install github.com/freman/shortie

That's it, the shortie binary in bin directory is now 100% self contained and ready to roll

Configuration

Configuration is stored in a TOML file, out of the box it stores data with vedis in memory.

There are example configuration files in the example directory but the basic gist is.

listen = "listen configuration"
storage = "{drivername}"

[config.{drivername}]
$options for driver

Known Issues

  • I've never actually used the mongo driver ;)
  • I googled the image used as a backdrop, it was all over the place with no attribution, if it's yours, let me know if you want me to remove it or credit you.
  • Needs a refactor for some real structure
  • Filters can cause lockup if they're porly defined or written

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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