cors_fasthttp/examples/server.go

21 lines
292 B
Go
Raw Normal View History

2017-08-31 07:30:44 +00:00
package main
import (
"context"
"github.com/valyala/fasthttp"
"git.loafle.net/commons_go/cors_fasthttp"
)
func main() {
ctx := context.Background()
2017-08-31 07:34:43 +00:00
c := cors_fasthttp.AllowAll(ctx)
2017-08-31 07:30:44 +00:00
fasthttp.ListenAndServe(":8080", c.Handler(Handler))
}
func Handler(ctx *fasthttp.RequestCtx) {
}