Skip to content

Simple HTTP Server that returns ip address, headers and many other request data. use this as a test app to to deploy in your servers or practice to deploy

License

Notifications You must be signed in to change notification settings

pareshpawar/simple-http-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple HTTP Server in Go as a Container Image

ci

simple-http-server returns IP address, headers and many other request data. Use this as a test app to to deploy in your servers or practice to deploy. you can use this image in docker or kubernetes based deployments

How it works?

  • Starts listening on port 8081 for HTTP traffic
  • On every request it returns following things:
    • Request Type
    • Hostname or Host of request
    • Local IP of Container
    • Remote IP
    • All Request Headers
    • And Environment Variable called YOUR_ENV
    • optionally mount html dir to /dist/html to serve html pages

How to use it?

  • I've hosted this image on Docker Hub or you can build it yourself if you want to.

    sudo docker run -p 8081:8081 pareshpawar/simple-http-server
  • Optionally, forward port via your proxy or load balancer.

To Do

  • Make std output/logs colored and pretty 😅
  • Serving html file as output on /html/ endpoint
  • create github actions for docker image build
  • Add Environment Variable to switch text output to html output
  • Serve a html pages from a external directory
  • Add volume Env var to serve volume as http dir

About

Simple HTTP Server that returns ip address, headers and many other request data. use this as a test app to to deploy in your servers or practice to deploy

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •