本文整理汇总了Golang中github.com/labstack/echo.Echo.ServeDir方法的典型用法代码示例。如果您正苦于以下问题:Golang Echo.ServeDir方法的具体用法?Golang Echo.ServeDir怎么用?Golang Echo.ServeDir使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/labstack/echo.Echo
的用法示例。
在下文中一共展示了Echo.ServeDir方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: loadHandlers
func loadHandlers(e *echo.Echo) {
if itrak.Debug {
e.SetDebug(true)
}
// Point to the client application generated inside the webapp dir
e.Index("./webapp/build/index.html")
e.ServeDir("/", "./webapp/build/")
server_stats = stats.New()
e.Use(server_stats.Handler)
e.Get("/stats", getStats)
e.Get("/test1", getTestData)
e.Get("/part", getPartsList)
e.Get("/task", getTaskList)
e.Get("/jtask", getJTaskList)
e.Post("/login", login)
e.Delete("/login", logout)
e.Get("/people", getPeople)
e.Get("/people/:id", getPerson)
e.Post("/people/:id", savePerson)
e.Get("/site", getSites)
e.Get("/site/:id", getSite)
e.Post("/site/:id", saveSite)
e.Get("/roles", getRoles)
e.Get("/vendors", getAllVendors)
e.Post("/vendors/:id", saveVendor)
// Equipment Related functions
e.Get("/equipment", getAllEquipment)
e.Get("/site_equipment/:id", getAllSiteEquipment)
e.Get("/equipment/:id", getEquipment)
e.Post("/equipment/:id", saveEquipment)
e.Get("/subparts/:id", subParts)
e.Get("/spares", getAllSpares)
e.Get("/spares/:id", getEquipment)
e.Post("/spares/:id", saveEquipment)
e.Get("/consumables", getAllConsumables)
e.Get("/consumables/:id", getEquipment)
e.Post("/consumables/:id", saveEquipment)
e.Get("/equiptype", getAllEquipTypes)
e.Get("/equiptype/:id", getEquipType)
e.Post("/equiptype/:id", saveEquipType)
e.Get("/task", getAllTask)
e.Get("/sitetask/:id", getSiteTasks)
e.Get("/task/:id", getTask)
e.Post("/task/:id", saveTask)
}