30 lines
646 B
Go
30 lines
646 B
Go
package main
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"git.minhas.io/asara/well-goknown/matrix"
|
|
"git.minhas.io/asara/well-goknown/nostr"
|
|
)
|
|
|
|
func main() {
|
|
/*
|
|
nostrTest := nostr.NostrRequest{
|
|
Name: "asara",
|
|
Key: "abcdefg",
|
|
Hostname: "devvul.com",
|
|
}
|
|
nostr.AddNostrAddr(nostrTest)
|
|
*/
|
|
// matrix endpoints
|
|
http.HandleFunc("/.well-known/matrix/server", matrix.MatrixServer)
|
|
http.HandleFunc("/.well-known/matrix/client", matrix.MatrixClient)
|
|
|
|
// nostr endpoints
|
|
http.HandleFunc("/.well-known/nostr.json", nostr.GetNostrAddr)
|
|
http.HandleFunc("/request/nostr", nostr.RequestNostrAddr)
|
|
|
|
// start server
|
|
http.ListenAndServe(":8090", nil)
|
|
}
|