diff options
author | Samuel Johnson <[email protected]> | 2025-02-10 02:19:21 -0500 |
---|---|---|
committer | Samuel Johnson <[email protected]> | 2025-02-10 02:19:21 -0500 |
commit | 9de239a9badbbc075f1cc8079a6435f0780e5d26 (patch) | |
tree | 559f29f7c3a0213a4fd712f4f325f5f820e6ca79 /cmd/web/main.go |
But it was a beginningtrunk
Diffstat (limited to 'cmd/web/main.go')
-rw-r--r-- | cmd/web/main.go | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/cmd/web/main.go b/cmd/web/main.go new file mode 100644 index 0000000..748e4bb --- /dev/null +++ b/cmd/web/main.go @@ -0,0 +1,19 @@ +package main + +import ( + "flag" + "fmt" + "log" + "net/http" + + "paterissa.net/mblog/cmd/web/handlers" +) + +func main() { + webmaster := flag.String("webmaster", "", "host of the website") + port := flag.Int("port", 5050, "the hosting port") + flag.Parse() + + router := handlers.RegisterEndpoints(*webmaster) + log.Fatal(http.ListenAndServe(fmt.Sprintf(":%d", *port), router)) +} |