hugo-micropub/main.go

20 lines
472 B
Go
Raw Normal View History

2019-11-07 10:00:24 +00:00
package main
import (
"log"
"net/http"
2019-12-06 09:32:30 +00:00
"strings"
2019-11-07 10:00:24 +00:00
"time"
)
func main() {
2019-12-24 11:29:14 +00:00
initConfig()
2019-11-07 10:00:24 +00:00
log.Println("Starting micropub server...")
log.Println("Current time: " + time.Now().Format(time.RFC3339))
2019-12-06 09:32:30 +00:00
log.Println("Blog URL: " + BlogUrl)
log.Println("Ignored URLs for Webmention: " + strings.Join(IgnoredWebmentionUrls, ", "))
2019-12-12 15:29:26 +00:00
http.HandleFunc("/micropub", HandleMicroPub)
http.HandleFunc("/webmention", HandleWebmention)
2019-11-07 10:00:24 +00:00
log.Fatal(http.ListenAndServe(":5555", nil))
}