initial hopefully work setup
This commit is contained in:
parent
ad8b83ac61
commit
6307923dd9
4 changed files with 70 additions and 38 deletions
9
main.go
9
main.go
|
|
@ -2,12 +2,13 @@ package main
|
|||
|
||||
import (
|
||||
"log"
|
||||
"fmt"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
func main() {
|
||||
cfg := LoadConfig()
|
||||
log.Printf("Port: %s", cfg.Port)
|
||||
log.Printf("Nsec: %s", cfg.NSec)
|
||||
log.Printf("Npub: %s", cfg.NPub)
|
||||
log.Printf("Relays: %s", cfg.Relays)
|
||||
http.HandleFunc("/", alertReceiver)
|
||||
log.Printf("Server starting on http://localhost:%d", cfg.Port)
|
||||
log.Fatal(http.ListenAndServe(fmt.Sprintf(":%d", cfg.Port), nil))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue