Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import (
- "log"
- "fmt"
- "github.com/valyala/fasthttp"
- )
- func main() {
- err := fasthttp.ListenAndServe("127.0.0.1:12345", handler); if err != nil {
- log.Fatalf("Error in ListenAndServe: %s", err)
- }
- }
- func handler(ctx *fasthttp.RequestCtx) {
- fmt.Fprintf(ctx, "HelloWorld")
- }
Add Comment
Please, Sign In to add comment