Public Repository

Last pushed: a year ago
Short Description
report the network address of the request as observed by this containerized network service
Full Description

runs a program build from this golang source:

package main

import (
        "net/http"
        "os"
)

func main() {
        port := os.Getenv("PORT0")
        if port == "" {
                panic("missing PORT0 envvar")
        }
        http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
                w.Write([]byte("request.remote-addr="+r.RemoteAddr))
        })
        println("listening on port "+port)
        err := http.ListenAndServe(":"+port, nil)
        if err != nil {
                panic(err)
        }
}
Docker Pull Command
Owner
jdef