Simple URL shortener written in Golang

Overview

Alviss

Introduction

Simple URL shortener project, written in Golang.

Setup and run

You can easily use the following command to simply run the project:

docker-compose -f deployments/docker-compose.yml up

Otherwise, you can install the project with go install in cmd/alviss/ directory and then use:

alviss runserver

To run the project on your machine; and there is a -p or --port flag to specify server port too.

**Note: if you are going to run the project on your local machine, you must have a redis-server running on background.

Routes

localhost:8080/:

Send a GET request and get a warm welcome :)

{
  "message": "Welcome to Alviss! Your mythical URL shortener."
}

localhost:8080/shorten:

POST a JSON object like below and in return, get the generated short link:

{
  "LongUrl": "https://gist.github.com/joshbuchea/6f47e86d2510bce28f8e7f42ae84c716",
  "ExpTime": "2d"
}

Exp date valid format: 2d for 2 days, 2h for 2 hours, 2m for 2 minutes and 2s for 2 seconds.

Result:

{
  "message": "short url created successfully",
  "ShortUrl": "http://localhost:8080/ZLgJHJB2"
}

localhost:8080/url/{YOUR-SHORTENED-URL}

Send a GET request and get details of your URL, such as UsedCount or ExpDate:

{
  "ExpDate": "2021-12-20T15:38:26.48860767Z",
  "OriginalUrl": "https://gist.github.com/joshbuchea/6f47e86d2510bce28f8e7f42ae84c716",
  "ShortUrl": "http://localhost:8080/ZLgJHJB2",
  "UsedCount": 3
}
Releases(v1.0)
Owner
Amir Iravanimanesh
Computer Eng. @ AUT
Amir Iravanimanesh
A simple URL shortener application.

url-shortener A simple URL shortener application. Features The service supports 2 data stores (in-memory and PostgreSQL). The -db parameter is used to

Demid Fedorov 0 Dec 9, 2021
Goshort - Just another simple url shortener to use with curl

qnd.be Just another simple url shortener to use with curl. Kinda like 0x0.st. Ju

rune 0 Jan 29, 2022
A URL shortener using http://is.gd/ and the Go programming language (http://golang.org/)

goisgd A simple command line URL shortener using http://is.gd/. Getting the Code go get github.com/NickPresta/GoURLShortener Usage Import this librar

Nick Presta 22 Apr 6, 2022
Url Shortener Api For Golang

Url Shortener Api Using Go Endpoints Get and redirect to long url GET: "/:id" Cr

Lutfi Andriyanto 1 May 29, 2022
Cfurlshort - Url Shortener service with golang

Url Shortener This respository contains the code for my url shortener service. D

null 0 Jan 26, 2022
a url shortener made using go and redis

__ | |--.--.--.----.-----. .-----.-----. | <| | | _|-- __|__| _ | _ | |__|__|_____|__| |_____|__|___

André Kelpe 76 Dec 10, 2020
urlsh is URL shortener application built on Go language.

GOlang URL shortener service with UI, API, Cache, Hits Counter and forwarder using postgres and redis in backend, bulma in frontend

Jitendra Adhikari 114 Jul 22, 2022
A barebones URL Shortener implementation in Go using Gin and MySQL. Also features a basic frontend.

URL Shortener in Go This is a barebones URL Shortener implementation in Go using the Gin web framework and MySQL. Also features a basic frontend. Loca

Shreyas Gupta 6 Dec 22, 2021
Go URL shortener

Golang Short URL To build the short link engine by Go. Development Environment: Ubuntu 20.04 Go 1.17.1 Requirement Console app, receive “URL” from any

Siong-Ui Te (戴上為) 0 Nov 4, 2021
Yandex practicum go url shortener service

go-musthave-shortener-tpl Шаблон репозитория для практического трека «Go в веб-р

Dindon 0 Feb 26, 2022
A sample url shortener app to test Keploy integration capabilities

Example URL Shortener A sample url shortener app to test Keploy integration capabilities Installation git clone https://github.com/keploy/example-url-

null 5 Mar 12, 2022
API from AnonURL website, an anonymous URL shortener

API from AnonURL website, an anonymous URL shortener

null 0 Jan 23, 2022
OMUS - One More URL Shortener

OMUS OMUS - One More URL Shortener; For now - planned only API. Functions: Gener

Vladislav 2 Feb 12, 2022
Short url backend - Go musthave shortener tpl

go-musthave-shortener-tpl Шаблон репозитория для практического трека «Go в веб-р

Dmitriy 0 Feb 15, 2022
The 'Scalable' URL shortener

Chinnaswamy The 'Scalable' URL shortener Running tests To run end to end tests: CHINNASWAMY_TEST_HOST="<host:port>" go test -count=1 ./integration_tes

nilenso 2 May 21, 2022
A simple demo written in Golang to shorten URL and redirect

url-shortener A simple demo written in Golang to shorten URL and redirect . ├── go.mod ├── go.sum ├── handler │ └── handlers.go ├── main.go ├── shor

lunarwhite 1 Jun 5, 2022
urlhunter is a recon tool that allows searching on URLs that are exposed via shortener services such as bit.ly and goo.gl.

a recon tool that allows searching on URLs that are exposed via shortener services

Utku Sen 1.2k Aug 1, 2022
This is a simple URL shortner Go Lang client that uses the short.io

Opinionated URL Shortner Client This is a simple URL shortner Go Lang client that uses the short.io TL;DR One liner (for my use case) ./short.io -key

karan singh 0 Feb 11, 2022
Url shortner service for golang

url-shortner-service Endpoints added 1.Health endpoint - to check if server is running or not http://localhost:8080/health HTTP method: GET 2.URL shor

Keshab Sahoo 0 Nov 21, 2021