Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alesr/urltinyizer
Simple URL shortener service written in Go
https://github.com/alesr/urltinyizer
Last synced: 3 days ago
JSON representation
Simple URL shortener service written in Go
- Host: GitHub
- URL: https://github.com/alesr/urltinyizer
- Owner: alesr
- License: mit
- Created: 2023-02-13T10:40:00.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2023-07-27T16:46:52.000Z (over 1 year ago)
- Last Synced: 2024-11-22T05:28:39.476Z (2 months ago)
- Language: Go
- Size: 18.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# URLTINYIZER
![master](https://github.com/alesr/urltinyizer/actions/workflows/ci.yaml/badge.svg)URLTINYIZER is a REST API written in Go that provides the following functionality:
## API
- Endpoint for creating short url
A POST request to /shorten endpoint with a JSON payload containing the long_url as a string returns a shortened url.
- Endpoint for redirecting users
A GET request to /{shortURL} redirects the user to the original long url and increments the number of hits.
- Stats endpoint
A GET request to /{shortURL}/stats returns the number of times a short url has been used.
The application runs on two Docker containers: one for the PostgreSQL database and the other for the application itself. To run the application, simply run make run.
## Commands
Run `make help` to see the available commands.