Initial commit
This commit is contained in:
26
main.go
Normal file
26
main.go
Normal 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()
|
||||
}
|
||||
Reference in New Issue
Block a user