golish

command module
v0.0.0-...-3dec747 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2023 License: MIT Imports: 15 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Golish

Easy to use Go Link Shortener. Golish is not intended for tens of millions of shortened links because it tries to cache all links to improve performance.

Golish screenshot

Run

  1. Download latest release
  2. Create config.ini file (Configuration)
  3. Run golish-**** -config config.ini

Configuration

  • host -- Server bind host (default: 0.0.0.0).
  • port -- Server bind port (default: 34532). Put 80 here for default http server.
  • slug-length -- Length of the generated short url (default: 5).
  • admin-path -- Secret path with admin interface (default: admin (example.com/@admin/)).
  • default-redirect -- Address to redirect from root page (root page - example.com/).
  • backend -- Backend type mysql or file (default: file).
  • mysql-host -- Mysql server address (default: 127.0.0.1:3306).
  • mysql-user -- Mysql user (default: golish).
  • mysql-password -- Mysql password (default: golish).
  • mysql-database -- Mysql database name (default: golish).
  • file-path -- Database file path for file backend (default: db.json).
Example of config.ini file
port = 80
admin-path = RANDOM_STRING
default-redirect = https://google.com
backend = mysql
mysql-user = user99
mysql-password = qwerty

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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