package main

import (
        "fmt"
        "net/http"
        "net/http/fcgi"
        "net"
)

type FastCGIServer struct{}

func (s FastCGIServer) ServeHTTP(w http.ResponseWriter, req *http.Request) {
        w.Write([]byte("Hello world in go for FastCGI.\n"))
}

func main() {
        l, _ := net.Listen("tcp", "127.0.0.1:9002")
        b := new(FastCGIServer)
        fcgi.Serve(l, b)
}
