fyp/main.go
2023-09-18 00:26:42 +01:00

27 lines
449 B
Go

package main
import (
"fmt"
"net/http"
)
func main() {
fmt.Println("Starting server on :8000!")
handle := Handle{}
handle.New()
handle.Get("login", func(mode AnswerType, w http.ResponseWriter, r *http.Request) *Error {
if mode == JSON {
return &Error{
code: 404,
};
}
LoadBasedOnAnswer(mode, w, "login.html", nil)
return nil;
})
handle.Startup()
}