()
| 126 | } |
| 127 | |
| 128 | func (e *KubePiServer) setUpRootRoute() { |
| 129 | e.app.Any("/", func(ctx *context.Context) { |
| 130 | ctx.Redirect("/kubepi") |
| 131 | }) |
| 132 | c := swagger.Config{ |
| 133 | URL: "/kubepi/swagger/doc.json", |
| 134 | } |
| 135 | e.app.Get("/kubepi/swagger/{any:path}", swagger.CustomWrapHandler(&c, swaggerFiles.Handler)) |
| 136 | e.rootRoute = e.app.Party("/kubepi") |
| 137 | } |
| 138 | |
| 139 | func (e *KubePiServer) setUpStaticFile() { |
| 140 | spaOption := iris.DirOptions{SPA: true, IndexName: "index.html"} |