Micropub endpoint for my blog https://jlelse.blog/posts/hugo-micropub/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
405 B

1 year ago
1 year ago
1 year ago
  1. package main
  2. import (
  3. "log"
  4. "net/http"
  5. "time"
  6. )
  7. func main() {
  8. err := initConfig()
  9. if err != nil {
  10. log.Fatal(err)
  11. }
  12. log.Println("Starting micropub server...")
  13. log.Println("Current time: " + time.Now().Format(time.RFC3339))
  14. log.Println("Blog URL: " + BlogUrl)
  15. http.HandleFunc("/micropub", HandleMicroPub)
  16. http.HandleFunc("/media", HandleMedia)
  17. log.Fatal(http.ListenAndServe(":5555", nil))
  18. }