functional simple api

This commit is contained in:
2024-08-23 16:39:20 -05:00
parent f9354196dd
commit ae4f12c159
18 changed files with 234 additions and 216 deletions

View File

@@ -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))
}