initial commit
This commit is contained in:
commit
037788d6de
56 changed files with 1756 additions and 0 deletions
27
main.go
Normal file
27
main.go
Normal 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)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue