Initial commit

This commit is contained in:
2023-09-18 00:26:42 +01:00
commit 1fd025e6d6
17 changed files with 458 additions and 0 deletions

26
main.go Normal file
View File

@@ -0,0 +1,26 @@
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()
}