https://github.com/nemuelw/ushortener
URL Shortening Service
https://github.com/nemuelw/ushortener
backend backend-api backend-service gin gin-gonic golang rest-api restful-api server url url-shortener
Last synced: about 1 year ago
JSON representation
URL Shortening Service
- Host: GitHub
- URL: https://github.com/nemuelw/ushortener
- Owner: nemuelw
- Created: 2023-09-16T11:48:36.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-17T04:58:29.000Z (almost 3 years ago)
- Last Synced: 2024-08-05T21:34:16.837Z (almost 2 years ago)
- Topics: backend, backend-api, backend-service, gin, gin-gonic, golang, rest-api, restful-api, server, url, url-shortener
- Language: Go
- Homepage:
- Size: 13.7 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ushortener
URL Shortening Service
## Installation
- Clone this repository onto your local machine
```
git clone https://github.com/nemzyxt/ushortener.git
```
- Navigate to the project directory and install required packages
```
go get
```
## Testing
```
go test
```
## Usage
Start the server
```
go run server.go
```
You can now use the service via its endpoints
## Example
Request:
```
POST http://localhost:1234/shorten
Content-Type: application/json
{
"longURL": "https://github.com/nemzyxt/ushortener"
}
```
Sample response:
```
{
"shortURL": "http://localhost:1234/AO_2paiIg"
}
```