Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
27 lines (21 sloc) 622 Bytes
package main // import ""
import (
func main() {
yml := flag.String("yml", "sally.yaml", "yaml file to read config from")
port := flag.Int("port", 8080, "port to listen and serve on")
log.Printf("Parsing yaml at path: %s\n", *yml)
config, err := Parse(*yml)
if err != nil {
log.Fatalf("Failed to parse %s: %v", *yml, err)
log.Printf("Creating HTTP handler with config: %v", config)
handler := CreateHandler(config)
log.Printf(`Starting HTTP handler on ":%d"`, *port)
log.Fatal(http.ListenAndServe(fmt.Sprintf(":%d", *port), handler))
You can’t perform that action at this time.