functional simple api
This commit is contained in:
6
main.go
6
main.go
@@ -9,8 +9,8 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
nkodeApi := nkode.NewNKodeAPI()
|
||||
handler := api.NKodeHandler{Api: nkodeApi}
|
||||
nkodeApi := nkode.NewNKodeInMemory()
|
||||
handler := api.NKodeHandler{Api: &nkodeApi}
|
||||
mux := http.NewServeMux()
|
||||
mux.Handle(api.CreateNewCustomer, &handler)
|
||||
mux.Handle(api.GenerateSignupInterface, &handler)
|
||||
@@ -19,6 +19,6 @@ func main() {
|
||||
mux.Handle(api.GetLoginInterface, &handler)
|
||||
mux.Handle(api.Login, &handler)
|
||||
mux.Handle(api.RenewAttributes, &handler)
|
||||
fmt.Println("Running on localhost:8080")
|
||||
fmt.Println("Running on localhost:8080...")
|
||||
log.Fatal(http.ListenAndServe("localhost:8080", mux))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user