pye/main.go

22 lines
363 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 10:44:12 +03:00
fmt.Println("=== Working on port 7102 ===")
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 16:59:47 +03:00
router.HandleFunc("GET /pem", 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 16:59:47 +03:00
router.HandleFunc("GET /login", Login) // TODO: temp
2024-10-12 09:55:58 +03:00
http.ListenAndServe(":7102", router)
2024-10-11 11:38:08 +03:00
}