Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/awcodify/go-url-shortener

Simple url shortener builded with Golang
https://github.com/awcodify/go-url-shortener

base64 go golang gorilla-mux gorm gorm-orm url-shortener

Last synced: 24 days ago
JSON representation

Simple url shortener builded with Golang

Awesome Lists containing this project

README

        

# go-url-shortener

Just a simple url shortener using Base64.
This simple application have ability to:
* check is param filled or not?
* check is url valid or not?
* return 404 when url not found in database

# How to use
* edit db.conf (we are using MySQL)
* just run `go run main.go`

# Routing

| Endpoint | Method | Response | Feature |
| ----------- |:------:|-----------------| ---------------------------------|
| /?url={url} | POST | JSON | url validation, mandatory param |
| /{id} | GET | 301 Redirection | |