pye/main.go

20 lines
298 B
Go
Raw Normal View History

2024-10-11 11:38:08 +03:00
package main
import (
"fmt"
2024-10-12 09:55:58 +03:00
"net/http"
2024-10-11 11:38:08 +03:00
)
func main() {
2024-10-12 09:55:58 +03:00
fmt.Println("=== PYE ===")
2024-10-11 11:38:08 +03:00
2024-10-12 09:55:58 +03:00
router := http.NewServeMux()
2024-10-11 11:38:08 +03:00
2024-10-12 09:55:58 +03:00
router.HandleFunc("GET /public-key", publicKey)
2024-10-11 11:38:08 +03:00
2024-10-12 09:55:58 +03:00
router.HandleFunc("POST /register", Register)
router.HandleFunc("POST /login", Login)
2024-10-11 11:38:08 +03:00
2024-10-12 09:55:58 +03:00
http.ListenAndServe(":7102", router)
2024-10-11 11:38:08 +03:00
}