Skip to content

πŸ€–πŸ—£ [Go] Minimal HTTP server that locally echoes the requests it receives

Notifications You must be signed in to change notification settings

stvhwrd/tiny-http-echo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 

Repository files navigation

tiny-http-echo

A minimal Go HTTP server that locally echoes the requests it receives.

This program can be useful in debugging HTTP clients and/or server components of distributed systems.


Example

Using 5 panes in tmux with 1 client (top left), 1 test server(bottom left), 3 tiny-http-echo servers.

Installation

Must have Go and Git installed

1. Retrieve source code:

  • go get -u github.com/stvhwrd/tiny-http-echo

2. Build binary:

  • go install github.com/stvhwrd/tiny-http-echo

Configuration

There is only one configuration option, taken as a runtime flag:

  -port string
        The port for this HTTP server to listen on, eg. -port=8080

Usage

Use go run and include the port flag:

  • go run $GOPATH/github.com/stvhwrd/tiny-http-echo -port=YOUR_PORT_GOES_HERE

or, if you have $GOPATH/bin in your $PATH, you can use the shorthand:

  • tiny-http-echo -port=YOUR_PORT_GOES_HERE

About

πŸ€–πŸ—£ [Go] Minimal HTTP server that locally echoes the requests it receives

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages