WWWShop/wwwshop/wwwshop.go

23 lines
429 B
Go

package wwwshop
import (
"net/http"
c "WWWShop/wwwshop/controller"
u "WWWShop/wwwshop/controller/usercontroller"
)
type WWWShop struct {}
func New() WWWShop {
var self = WWWShop {};
return self;
}
func (self WWWShop) Init() {
user_controller := c.GenerateController(u.New())
http.Handle("/user", user_controller)
http.Handle("/user/", user_controller)
http.ListenAndServe(":8080", nil)
}