gopher listener

pull/710/head
idk 1 year ago
parent 596b486544
commit af11b39459
No known key found for this signature in database
GPG Key ID: D75C03B39B5E14E1
  1. 7
      gopher.go

@ -24,10 +24,13 @@ import (
func initGopher(apper Apper) {
handler := NewWFHandler(apper)
gopher.HandleFunc("/", handler.Gopher(handleGopher))
log.Info("Serving on gopher://localhost:%d", apper.App().Config().Server.GopherPort)
gopher.ListenAndServe(fmt.Sprintf(":%d", apper.App().Config().Server.GopherPort), nil)
listener, err := Listen("tcp", fmt.Sprintf("%s:%d", apper.App().Config().Server.Bind, apper.App().Config().Server.GopherPort))
if err != nil {
panic(err)
}
gopher.Serve(listener, nil)
}
// Utility function to strip the URL from the hostname provided by app.cfg.App.Host

Loading…
Cancel
Save