blob: 57e52bb79d7fb1b019f20da2c6f0b33c994558bd [file] [log] [blame]
// Copyright 2020 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
"log"
"net/http"
"os"
)
func main() {
http.Handle("/", fileServerHandler(relativeFile("./static"), http.HandlerFunc(homeHandler)))
port := os.Getenv("PORT")
if port == "" {
port = "8080"
}
log.Printf("Listening on :" + port)
log.Fatal(http.ListenAndServe(":"+port, http.DefaultServeMux))
}