pye/main.go

24 lines
469 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 18:39:38 +03:00
// Note: likely temporary, possibly to be replaced by a fake "frontend"
router.HandleFunc("GET /login", Login)
router.HandleFunc("GET /register", Register)
2024-10-12 16:59:47 +03:00
2024-10-12 09:55:58 +03:00
http.ListenAndServe(":7102", router)
2024-10-11 11:38:08 +03:00
}