pwa-spectre/cmd/pwa-spectre/main.go

19 lines
345 B
Go

package main
import (
"flag"
"fmt"
"net/http"
"go.jolheiser.com/pwa-spectre/assets"
)
func main() {
portFlag := flag.Int("port", 9276, "port to listen on")
flag.Parse()
http.Handle("/", http.FileServer(http.FS(assets.Assets)))
fmt.Printf("http://localhost:%d\n", *portFlag)
http.ListenAndServe(fmt.Sprintf(":%d", *portFlag), nil)
}