Logo

dev-resources.site

for different kinds of informations.

GOlang URL shortener service using postgres, redis, bulma

Published at
3/29/2021
Categories
go
showdev
gorm
redigo
Author
adhocore
Categories
4 categories in total
go
open
showdev
open
gorm
open
redigo
open
Author
8 person written this
adhocore
open
GOlang URL shortener service using postgres, redis, bulma

You can use it via the mobile friendly web UI or automate it with API already provided. I'm also thinking of building a browser extension to shorten any URL in a click (context menu for example).

Usage

Just visit urlssh.xyz. You can also integrate API for programmatic usage.

PS: https://urlssh.xyz/6OTMTS is short link to this article 😎

GitHub logo adhocore / urlsh

Golang URL shortener and bookmarker service with UI, API, Cache, Hits Counter and forwarder using postgres and redis in backend, bulma in frontend. Think of it as self hosting ready url shortener.

urlsh

Latest Version Software License lint test Tweet Support

urlsh is URL shortener application built on Go language.

It does not use external libraries except the gorm for postgres database and minimal redis module redigo.

URLSH

Usage

Web client

Just visit urlssh.xyz. You can also integrate API for programmatic usage.

Terminal client

If you live inside the command line terminal, you can install a client:

go get github.com/adhocore/urlsh/cmd/urlshc
Enter fullscreen mode Exit fullscreen mode

or, with newer go versions

go install github.com/adhocore/urlsh/cmd/urlshc
Enter fullscreen mode Exit fullscreen mode

Make sure $GOPATH or $HOME/go/bin is in your $PATH or %path%, then use it like so:

# show help
urlshc -h

# shorten a url
urlshc -url 'https://your.long.url/here'

# shorten a url with keywords and expiry date
urlshc -url 'https://your.long.url/here' -keywords 'word-1,word2' -expires '2022-12-31'

# if you have self hosted or local instance of urlsh, pass in URLSH_HOST (with domain only)
URLSH_HOST=https://your.urlsh-instance.com urlshc -url 'https://your.long.url/here'
Enter fullscreen mode Exit fullscreen mode

Read below for self hosting…

gorm Article's
26 articles in total
Favicon
Gorm: Sneak Peek of Custom Data Types
Favicon
GORM, PostgreSQL & Atlas
Favicon
Gorm Pagination With Ease
Favicon
How to Use Arrays as Parameters in Golang?
Favicon
Basic CRUD Operations Using Golang, Gin Gonic, and GORM
Favicon
GORM and Goose Migrations
Favicon
Gin + Gorm Practical Guide, Implementing a Simple Q&A Community Backend Service in One Hour
Favicon
A secret weapon to improve the efficiency of golang development, a community backend service was developed in one day
Favicon
Building CRUD Operations in Golang 🎉
Favicon
Some GORM Tips and Notes
Favicon
Gorm level UP: how to upgrade and start to use Gorm v2
Favicon
5chan API - Golang, GORM, Go-fiber
Favicon
Pagination using Gorm scopes
Favicon
GOlang URL shortener service using postgres, redis, bulma
Favicon
RestFull API Detailing
Favicon
Daily Blog
Favicon
Rest API Database Blog Post
Favicon
Prevent updating query updates all records in GORM
Favicon
Init project
Favicon
Creating a complete golang rest api from zero to Hero
Favicon
ตัวอย่างการสร้าง Many to Many Association ผ่าน GORM
Favicon
DataBinding and GORM objects
Favicon
Creating an opinionated GraphQL server with Go - Part 4
Favicon
Creating an opinionated GraphQL server with Go - Part 3
Favicon
Grails: Mocking domain objects/criteria that reference Joda Time objects
Favicon
Go's ORM framework GORM best practices indefinite parameter usage

Featured ones: