implement api
This commit is contained in:
22
main.go
22
main.go
@@ -1,9 +1,23 @@
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
import (
|
||||
"fmt"
|
||||
"go-nkode/core/api"
|
||||
"log"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
func main() {
|
||||
a := 3
|
||||
b := a / 2
|
||||
fmt.Println(b)
|
||||
nkodeApi := api.NewNKodeAPI()
|
||||
handler := api.NKodeHandler{Api: nkodeApi}
|
||||
mux := http.NewServeMux()
|
||||
mux.Handle(api.CreateNewCustomer, &handler)
|
||||
mux.Handle(api.GenerateSignupInterface, &handler)
|
||||
mux.Handle(api.SetNKode, &handler)
|
||||
mux.Handle(api.ConfirmNKode, &handler)
|
||||
mux.Handle(api.GetLoginInterface, &handler)
|
||||
mux.Handle(api.Login, &handler)
|
||||
mux.Handle(api.RenewAttributes, &handler)
|
||||
fmt.Println("Running on localhost:8080")
|
||||
log.Fatal(http.ListenAndServe("localhost:8080", mux))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user