initial commit

This commit is contained in:
Peter Rounce 2022-08-01 10:36:32 +00:00
commit 037788d6de
56 changed files with 1756 additions and 0 deletions

27
main.go Normal file
View file

@ -0,0 +1,27 @@
package main
import (
log "github.com/sirupsen/logrus"
"net/http"
"os"
)
func main() {
log_level := os.Getenv("LOG_LEVEL")
if log_level == "DEBUG" {
log.SetLevel(log.DebugLevel)
}
log.SetFormatter(&log.JSONFormatter{
DisableHTMLEscape: true,
})
mux := http.NewServeMux()
mux.HandleFunc("/ln", lnurlw_response)
mux.HandleFunc("/cb", lnurlw_callback)
err := http.ListenAndServe(":9000", mux)
log.Fatal(err)
}