Created
June 19, 2017 08:04
-
-
Save polidog/b6224531e6838edc0bdbcc1576b41939 to your computer and use it in GitHub Desktop.
gin+fcgiはこんな感じでいいの?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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