Get the image from docker hub
docker pull mcmull27/blinky:latestSmall webserver for small tests. Use it to answer questions
- Can I hit an endpoint?
- Are my ports open?
- Is my proxy working?
- Is my ingress configured correctly?
- Whatever?
Set HOST, PORT, and route PREFIX with corresponding env vars.
Defaults:
export HOST="0.0.0.0"
export PORT="8080"
export PREFIX="app"Start the server with nodejs
node server.jsBrowse the page at localhost
# echo "localhost:$PORT/$PREFIX/blinky.html"
localhost:8080/app/blinky.htmlGet the endpoint
# GET /$PREFIX/blinky
curl localhost:8080/app/blinkyGet number of requests made to the /blinky endpoint
# GET /$PREFIX/hits
curl localhost:8080/app/hitsSet the /blinky endpoint's response code with a POST to /status
# POST /$PREFIX/status
curl -H "Content-Type: application/json" -d '{"status":"401"}' -X POST localhost:8080/app/statusGet endpoints that execute with known Big-O time complexity
# bubble sort on an already sorted list with variable length
# GET /$PREFIX/n/:count
curl localhost:8080/app/n/100
# bubble sort on a reverse sorted list with variable length
# GET /$PREFIX/nsquared/:count
curl localhost:8080/app/nsquared/100
# merge sort on a random list with variable length
# GET /$PREFIX/nlogn/:count
curl localhost:8080/app/nlogn/100Get an endpoint with a specific timeout
# return a response in 1 second
# GET /$PREFIX/timeout/:milliseconds
curl localhost:8080/app/timeout/1000- A webpage!
- An endpoint!

