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 shortner endpoint - returns a short URL http://localhost:8080/short-url?longURL=http://google.com/1346461234567890123456789/get/who_is_who HTTP Method: GET Sample JSON Response:

{ "originalURL": "http://google.com/1346461234567890123456789/get/who_is_who", "shortURL": "http://localhost:8080/2TrAnj1lRpP^" }

  1. Redirect endpoint - It will redirect the request to the original url http://localhost:8080/2TrAnj1lRpP^ will redirect to http://google.com/1346461234567890123456789/get/who_is_who

Steps to execute application locally:

Note: Go should be installed local machine

1.To run test cases > go test 2.To run url-shortner-service > go run server.go or >./url-shortner-service.exe 3.Then we can test the above end endpoints

I faced some issue to run docker comand due to some network policy restriction. So I have built an executable, which can be used to start the application anywhere.

Similar Resources

urlsh is URL shortener application built on Go language.

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

Dec 11, 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

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

Nov 4, 2021

This is a small API that provides basic REST endpoints to shorten a URL

This is a small API that provides basic REST endpoints to shorten a URL

This is a small API that provides basic REST endpoints to shorten a URL, get information about the URL, update the URL, and get statistics on most accessed URLs.

Nov 16, 2021

A URL shortening server with CLI client

Shorten A service and CLI client that receives a URL, returns a shortened URL then redirects on request. Setup Dependencies Go (1.17+) Postgres (14+)

Aug 9, 2022

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

Dec 9, 2021

A sample url shortener app to test Keploy integration capabilities

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-

Oct 22, 2022

API from AnonURL website, an anonymous URL shortener

API from AnonURL website, an anonymous URL shortener

Jan 23, 2022

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

Jan 29, 2022
Cfurlshort - Url Shortener service with golang

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

Jan 26, 2022
Shortener - URL shortener with golang (Link shortening service)
Shortener - URL shortener with golang (Link shortening service)

URL shortener (Сервис сокращения размеров ссылки) Запуск приложения осуществляет

Feb 1, 2022
longurl is a self-hosted short url service.

longurl Introduction longurl is a self-hosted short url service. Try It Out curl -H "Content-Type:application/json" -X POST --data '{"url": "https://g

Oct 24, 2022
Yandex practicum go url shortener service

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

Feb 26, 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

Apr 6, 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

Jun 5, 2022
Url Shortener Api For Golang

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

May 29, 2022
Simple URL shortener written in Golang

Alviss Introduction Simple URL shortener project, written in Golang. Setup and r

Aug 25, 2022
Urlshorter - A restful url shorter for golang

To who that review this code: I try my best to dockerize files and project but I

Dec 31, 2021
a url shortener made using go and redis

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

Dec 10, 2020