haberdasher-twirp/cmd/main.go
2021-07-26 09:00:25 -05:00

21 lines
354 B
Go

package main
import (
"net/http"
"os"
"haberdasher-twirp/haberdasher"
"haberdasher-twirp/internal/haberdasherserver"
)
func main() {
var bind string = ":8080"
if len(os.Args) > 1 {
bind = os.Args[1]
}
server := &haberdasherserver.Server{}
twirpHandler := haberdasher.NewHaberdasherServer(server)
http.ListenAndServe(bind, twirpHandler)
}