giulianopa / HttpRedirect

Http redirect in Golang

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

Http redirect in Golang

License:Apache License 2.0


Languages

Language:Go 100.0%