Skip to content

Commit

Permalink
Merge pull request #13 from maxzhang1985/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
yoyofx authored Nov 26, 2019
2 parents 70aeb6a + 24ef95c commit 21cfa65
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion Examples/SimpleWeb/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func main() {

}

//region Create the builder of Web host
/* Create the builder of Web host
func CreateCustomWebHostBuilder(args []string) YoyoGo.HostBuilder {
return YoyoGo.NewWebHostBuilder().
UseServer(YoyoGo.DefaultHttps(":8080", "./Certificate/server.pem", "./Certificate/server.key")).
Expand All @@ -26,7 +26,9 @@ func CreateCustomWebHostBuilder(args []string) YoyoGo.HostBuilder {
}).
UseRouter(RouterConfigFunc)
}
*/

//region router config function
func RouterConfigFunc(router Router.IRouterBuilder) {
router.GET("/error", func(ctx *Context.HttpContext) {
panic("http get error")
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,19 @@ func main() {
webHost.Run()
}

//region Create the builder of Web host

/* Create the builder of Web host
func CreateCustomWebHostBuilder(args []string) YoyoGo.HostBuilder {
return YoyoGo.NewWebHostBuilder().
UseServer(YoyoGo.DefaultHttps(":8080", "./Certificate/server.pem", "./Certificate/server.key")).
Configure(func(app *YoyoGo.ApplicationBuilder) {
//app.UseMvc()
app.UseStatic("Static")
}).
UseRouter(RouterConfigFunc)
}
*/

//region router config function
func RouterConfigFunc(router Router.IRouterBuilder) {
router.GET("/error", func(ctx *Context.HttpContext) {
panic("http get error")
Expand Down

0 comments on commit 21cfa65

Please sign in to comment.