All Projects → LevInteractive → dwarf

LevInteractive / dwarf

Licence: other
A O(1) URL shortener microservice backed by redis and gRPC communication.

Programming Languages

go
31211 projects - #10 most used programming language
shell
77523 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to dwarf

gShort
URL Shortener without all the crap
Stars: ✭ 80 (+142.42%)
Mutual labels:  url-shortener, shortener, url-shortener-microservice
ksana.in
✂️ Layanan pemendek tautan yang mudah, gratis & tanpa iklan
Stars: ✭ 186 (+463.64%)
Mutual labels:  url-shortener, shortener
yii2-minify-url
Project on YII2 framework for create short url (url shortener)
Stars: ✭ 15 (-54.55%)
Mutual labels:  url-shortener, shortener
Base62
PHP Base62 encoder and decoder for integers and big integers with Laravel 5 support.
Stars: ✭ 16 (-51.52%)
Mutual labels:  url-shortener, shortener
YOURLS
🔗 The de facto standard self hosted URL shortener in PHP
Stars: ✭ 9,007 (+27193.94%)
Mutual labels:  url-shortener, shortener
ursho
URL Shortener Service in Go
Stars: ✭ 118 (+257.58%)
Mutual labels:  url-shortener, shortener
urlzap
⚡️ Your own static URL shortener
Stars: ✭ 57 (+72.73%)
Mutual labels:  url-shortener, shortener
goalie-url-shortener
An implementation of go/ vanity-urls with LDAP support that makes it simple to access internal web assets on a coorporate network.
Stars: ✭ 16 (-51.52%)
Mutual labels:  url-shortener
url-shortener
A URL Shortener Application built with Node.js, Express and MongoDB
Stars: ✭ 16 (-51.52%)
Mutual labels:  url-shortener
ShortURL-Services-List
A list of 600+ URL shorteners (i.e goo.gl, bit.ly)
Stars: ✭ 32 (-3.03%)
Mutual labels:  url-shortener
em-shorty
Another URL shortener based on Event Machine and rack-fiber_pool
Stars: ✭ 56 (+69.7%)
Mutual labels:  url-shortener
node-bypasser
Bypass URL shortener websites
Stars: ✭ 33 (+0%)
Mutual labels:  shortener
small-sh
Um encurtador de URL's gratuito e Open source. Torne suas URL's um tanto pequenas forma rápida e gratuita
Stars: ✭ 30 (-9.09%)
Mutual labels:  shortener
shorty
URL shortener available as library, microservice (even containerized), aws lambda, and azure function
Stars: ✭ 31 (-6.06%)
Mutual labels:  url-shortener
Becoditive-API
The official API of beCoditive with many endpoints like memes, animals, image manipulation, url shortner, etc.
Stars: ✭ 14 (-57.58%)
Mutual labels:  url-shortener
bingus.link
A free, private URL shortener
Stars: ✭ 19 (-42.42%)
Mutual labels:  url-shortener
FireShort
A URL Shortener made using React.JS and Google Firestore
Stars: ✭ 29 (-12.12%)
Mutual labels:  url-shortener
1pt
A URL shortener with protection against malicious redirects
Stars: ✭ 20 (-39.39%)
Mutual labels:  url-shortener
secusu
SЁCU is a public API to store self-destructing data payloads with url shortener and handle anonymous chat-rooms.
Stars: ✭ 24 (-27.27%)
Mutual labels:  url-shortener
miniurl
A production-ready URL shortener microservice.
Stars: ✭ 20 (-39.39%)
Mutual labels:  url-shortener

dwarf

A high-throughput URL shortener microservice built with Go.

  • gRPC for communication
  • Redis store out of the box
  • Fast & simple

Usage

See start-dev.sh for a complete list of available environmental variables. To use in a docker container, we have an image here.

GET /{short-hash} -> 301 redirection

Dwarf will deliver a 301 redirection to the destination URL or redirect to the fallback URL specified with NOTFOUND_REDIRECT_URL.

Creating short links

You must communicate with dwarf via gRPC in order to generate new shortened URLs.

service Dwarf {
	rpc Create(CreateRequest) returns (CreateResponse) {}
}

message CreateRequest {
	repeated string urls = 1;
}

message CreateResponse {
	repeated string urls = 2;
}

Your response will return a set of shortened urls in the same order that they were sent:

// -> Request
{ "urls": ["http://long-url.com/1", "http://long-url.com/2"] }

// -> Response
{ "urls": ["http://sh.ort/Mp", "http://sh.ort/uJ"] }

A dwarf gRPC client written with node.js

To generate short urls, use a gRPC client such as this node client.

Development

Redis Store

Spin up an instance of redis with:

docker run -p "6379:6379" --rm --name dwarf-redis redis:4-alpine

Testing

go test github.com/LevInteractive/dwarf/ -v

Note that the tests rely on a running redis instance.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].