initial commit

This commit is contained in:
2026-02-27 13:23:16 +03:00
commit 3701af1fd7
12 changed files with 512 additions and 0 deletions

30
main.go Normal file
View File

@@ -0,0 +1,30 @@
package main
import (
"Hyst2Auth/app"
"log"
"net/http"
)
func main() {
app.LoadIP()
app.LoadConfig()
_, err := app.LoadProvider()
if err != nil {
panic(err)
}
r := http.NewServeMux()
r.HandleFunc("/add", app.AddUser)
r.HandleFunc("/delete", app.DeleteUser)
r.HandleFunc("/users", app.AllUsers)
r.HandleFunc("/connect_url", app.GetUserURL)
r.HandleFunc("/auth", app.DoAuth)
log.Println("Listening on :8080")
if err := http.ListenAndServe(":8080", r); err != nil {
log.Fatal(err)
}
}