20 lines
472 B
Go
20 lines
472 B
Go
package main
|
|
|
|
import (
|
|
"log"
|
|
"net/http"
|
|
"strings"
|
|
"time"
|
|
)
|
|
|
|
func main() {
|
|
initConfig()
|
|
log.Println("Starting micropub server...")
|
|
log.Println("Current time: " + time.Now().Format(time.RFC3339))
|
|
log.Println("Blog URL: " + BlogUrl)
|
|
log.Println("Ignored URLs for Webmention: " + strings.Join(IgnoredWebmentionUrls, ", "))
|
|
http.HandleFunc("/micropub", HandleMicroPub)
|
|
http.HandleFunc("/webmention", HandleWebmention)
|
|
log.Fatal(http.ListenAndServe(":5555", nil))
|
|
}
|