Skip to content

Instantly share code, notes, and snippets.

@polidog
Created June 19, 2017 08:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save polidog/b6224531e6838edc0bdbcc1576b41939 to your computer and use it in GitHub Desktop.
Save polidog/b6224531e6838edc0bdbcc1576b41939 to your computer and use it in GitHub Desktop.
gin+fcgiはこんな感じでいいの?
package main
import (
"github.com/gin-gonic/gin"
"net"
"net/http/fcgi"
)
func main() {
r := gin.Default()
r.GET("/", func(c *gin.Context) {
c.String(200, "hello, world.")
})
l, _ := net.Listen("tcp", ":9000")
fcgi.Serve(l, r)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment