https://github.com/jcserv/mjurl
A simple URL Shortening service implemented in Go
https://github.com/jcserv/mjurl
golang grpc postgresql rest-api
Last synced: 25 days ago
JSON representation
A simple URL Shortening service implemented in Go
- Host: GitHub
- URL: https://github.com/jcserv/mjurl
- Owner: jcserv
- License: gpl-3.0
- Created: 2024-01-03T22:55:17.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-20T23:19:31.000Z (almost 2 years ago)
- Last Synced: 2025-02-09T12:28:30.265Z (over 1 year ago)
- Topics: golang, grpc, postgresql, rest-api
- Language: Go
- Homepage:
- Size: 52.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mjurl
mjurl ("Mike and Jarrod's URL Shortening Service") is a simple Go API that allows users to shorten URLs.
Based on ByteByteGo's URL Shortener problem in System Design Interview Vol. 1
## Getting Started
### Starting the Server with Docker
1. Ensure you have [Docker Engine](https://docs.docker.com/engine/install/) installed.
2. Run `make run`
3. Execute requests against `http://localhost:8080` to your heart's content
## API Routes
### POST /v1/api/url
Request Body:
```
{
"url": "https://github.com"
}
```
Response:
```
200 OK
""
```
### GET /v1/api/url/{shortURL}
Response:
```
308 PERMANENT REDIRECT
Location:
```
## Contributors
- [@jcserv](https://github.com/jcserv)
- [@imphungky](https://github.com/imphungky)
## License
Distributed under the GNU-GPL License. See `LICENSE` for more information.