well-goknown/main.go

29 lines
572 B
Go
Raw Normal View History

package main
import (
"net/http"
"git.minhas.io/asara/well-goknown/matrix"
"git.minhas.io/asara/well-goknown/nostr"
)
func main() {
2023-02-03 04:56:15 +00:00
/*
nostrTest := nostr.NostrRequest{
Name: "asara",
Key: "abcdefg",
Hostname: "devvul.com",
}
nostr.AddNostrAddr(nostrTest)
*/
// matrix endpoints
http.HandleFunc("/.well-known/matrix/server", matrix.Matrix)
2023-02-03 04:56:15 +00:00
// nostr endpoints
http.HandleFunc("/.well-known/nostr.json", nostr.GetNostrAddr)
2023-02-03 04:56:15 +00:00
http.HandleFunc("/request/nostr", nostr.RequestNostrAddr)
// start server
http.ListenAndServe(":8090", nil)
}