Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kaoudis/going-experimentally
https://github.com/kaoudis/going-experimentally
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/kaoudis/going-experimentally
- Owner: kaoudis
- License: mit
- Created: 2017-03-21T02:57:30.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-29T04:18:40.000Z (almost 8 years ago)
- Last Synced: 2024-10-31T00:43:58.596Z (2 months 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
# going-experimentally
A smol Go server that just returns base64-encoded hashes of client 'password' requests.
# build and run (get back a b64-encoded hash)
1. In window/tab 1: `go build && ./going-experimentally`
2. In window/tab 2: `curl -vX POST "http://localhost:8080" -d "password=frogs"`The result in window 2 should be `3WZK2iUU8F4TjzXGlXDpO1fkjfNMPp5Pv+Mu9kAoVoPAylYukEfpXcGV5Cp5ddGsgAbaShIRYTDTXzp+QidhVw==`
Notes: server will wait 5 seconds on each request with the connection open before answering. If you choose to test the non-happy paths, you will see some logging output from the server beginning with 'Method not allowed' or 'Bad request'.
# build and run tests
`go build && go test`# see test coverage (opens a new browser window)
`go test -coverprofile=coverage.out && go tool cover -html=coverage.out`