# fastcgi **Repository Path**: xqhero/fastcgi ## Basic Information - **Project Name**: fastcgi - **Description**: 使用go编写的fastcgi包,旨在理解fastcgi协议包的结构,以及返回的数据格式 - **Primary Language**: Go - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 2 - **Forks**: 0 - **Created**: 2021-01-22 - **Last Updated**: 2021-01-25 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 下载 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") } } ``` # 文档说明 https://wiki.xqhero.com/docs/tcp-ip