/HttpRedirect

Http redirect in Golang

Primary LanguageGoApache License 2.0Apache-2.0

Http Redirect in Golang

This is meant mainly as a Go playground. The idea is to run a redirect service that logs the IP address of the remote host.

Build and run

To build:

$ cd HttpRedirect/
$ go get github.com/gorilla/mux
$ go build redirect.go

To run:

$ ./redirect

Then, from a browser: localhost:8080/r/<URL_to_redirect_to> To see the log: localhost:8080/log (or check the standard output).

Useful links