Giter Site home page Giter Site logo

toricls / http-hey-yo Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 0.0 5 KB

Returns any HTTP status code you want, as a simple http server

Home Page: https://gallery.ecr.aws/toricls/http-hey-yo

License: MIT License

Dockerfile 4.17% Shell 95.83%
hey-yo http-server http-status-code netcat

http-hey-yo's Introduction

http-hey-yo

MIT License Hey, Yo!

Returns any HTTP status code you want, as a simple http server

Usage

$ docker run -p 1500:1500 \
  -e RESPONSE_HTTP_STATUS_CODE=503 \
  -e LISTEN_PORT=1500 \
  public.ecr.aws/toricls/http-hey-yo:latest

then, you'll see a simple HTTP server running.

2020-08-13T09:11:22+0000 RESPONSE_HTTP_STATUS_CODE: 503
2020-08-13T09:11:22+0000 LISTEN_PORT              : 1500
2020-08-13T09:11:22+0000 HTTP server being ready

Let's curl it.

$ curl -i http://localhost:1500
HTTP/1.1 503 Service Unavailable

2020-08-13T08:58:39+0000 Hey, Yo!

$ curl -i http://localhost:1500/meaninglesspath
HTTP/1.1 503 Service Unavailable

2020-08-13T08:59:04+0000 Hey, Yo!

Runtime options (as container environment variables)

1. RESPONSE_HTTP_STATUS_CODE

The default value is 200. Set this value to change the HTTP response status code of http-hey-yo.

2. LISTEN_PORT

The default value is 8080. Set this value to change the listen port number of http-hey-yo.

Build your own Hey-Yo container

$ docker build -t YOUR-NAME/http-hey-yo .
$ docker push YOUR-NAME/http-hey-yo

Contribution

  1. Fork (https://github.com/toricls/http-hey-yo/fork)
  2. Create a feature branch
  3. Commit your changes
  4. Rebase your local changes against the master branch
  5. Create a new Pull Request

Licence

MIT

Author

Tori

http-hey-yo's People

Contributors

toricls avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

http-hey-yo's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.