Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/awcodify/go-url-shortener
- Owner: awcodify
- Created: 2017-09-25T16:59:33.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-09-26T11:32:11.000Z (over 7 years ago)
- Last Synced: 2024-10-21T22:57:25.065Z (2 months ago)
- Topics: base64, go, golang, gorilla-mux, gorm, gorm-orm, url-shortener
- Language: Go
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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 | |