Add saving user, add nonpersistant register login handling
This commit is contained in:
@@ -1,5 +1,19 @@
|
||||
package main
|
||||
|
||||
func main() {
|
||||
import (
|
||||
"context"
|
||||
"log"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
InitDatabase(ctx)
|
||||
|
||||
http.HandleFunc("/ws", ServeWsConnection)
|
||||
http.HandleFunc("/register", RegisterHandler)
|
||||
http.HandleFunc("/login", LoginHandler)
|
||||
|
||||
log.Println("listening on :8080")
|
||||
log.Fatal(http.ListenAndServe(":8080", nil))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user