Fetch the repository succeeded.
go get gitee.com/xqhero/fastcgi
package main
import (
"fmt"
"gitee.com/xqhero/fastcgi"
"io/ioutil"
"net/http"
)
func main() {
http.HandleFunc("/", func(writer http.ResponseWriter, request *http.Request) {
bytes, _ := ioutil.ReadFile("./index.html")
writer.Write(bytes)
})
server := fastcgi.NewFcgiServer("127.0.0.1:9000", nil)
err := server.Start()
if err != nil {
fmt.Println("fcgiserver start error")
}
}
Sign in for post a comment
Comments ( 0 )