https://github.com/taluu/fizzbuzz-go
A try to implement a http server in go answering to fizzbuzz requests
https://github.com/taluu/fizzbuzz-go
Last synced: 7 months ago
JSON representation
A try to implement a http server in go answering to fizzbuzz requests
- Host: GitHub
- URL: https://github.com/taluu/fizzbuzz-go
- Owner: Taluu
- License: mit
- Created: 2021-10-14T20:48:42.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-10-23T04:46:21.000Z (over 4 years ago)
- Last Synced: 2025-02-16T12:33:48.322Z (over 1 year ago)
- Language: Go
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Fizzbuzz Http Server
====================
A smal project for me to learn more practical go and also show what I can do when learning new things.
Quick documentation
-------------------
### Usage
```bash
$ go build
$ ./fizzbuzz-go
$ ./fizzbuz-go -host domin.tld # default localhost
$ ./fizzbuzz-go -port 8081 # default 8080
```
```bash
$ curl -X POST http://localhost:8080/fizzbuzz -d "{\"int1\": 3, \"int2\": 5, \"limit\": 100, \"str1\": \"fizz\", \"str2\": \"buzz\"}"
```
To post a new fizzbuzz request. Every parameter in the json body are optionnal and will take these values if not set.
```bash
$ curl http://localhost:8080/stats
```
Prints the stats and requests used (sorted by mostly used)