url-shortener

command module
v0.0.0-...-4996f4d Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2025 License: MIT Imports: 8 Imported by: 0

README

URL Shortener

A simple and efficient URL shortener service written in Go, using the Gin web framework, Redis for caching, and SQLite3 for persistent storage.

This project is inspired by Eddy WM's go-shortener-wm.

Prerequisites

  • Go 1.21+
  • Redis server with Bloom Filter module

Setup

  1. Install Redis.
  1. Clone the respository
git clone https://github.com/csBenClarkson/url-shortener.
cd url-shortener
  1. Get Go dependencies
go mod tidy
  1. Run the server with default settings and password
SHORTENER_SECRET=<YOUR_PASSWORD> go run .

Usage

You can configurate the Redis server address, sqlite3 database file location, host address, etc. through program arguments. Use go run . -h to see the help page.

You can also build the binary and run it.

go build .
SHORTENER_SECRET=<YOUR_PASSWORD> ./url-shortener [...argument]

License

This project use the MIT license. However, there are third-party modules used in this project. Check THIRD_PARTY_LICENSES for details.

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