Add ability to launch pgweb with url prefix

This commit is contained in:
Dan Sosedoff
2016-02-19 21:14:56 -06:00
parent f308d1cfde
commit 0a144a633d
7 changed files with 30 additions and 19 deletions

View File

@@ -14,10 +14,12 @@ func SetupMiddlewares(group *gin.RouterGroup) {
}
func SetupRoutes(router *gin.Engine) {
router.GET("/", GetHome)
router.GET("/static/*path", GetAsset)
group := router.Group(command.Opts.Prefix)
api := router.Group("/api")
group.GET("/", GetHome)
group.GET("/static/*path", GetAsset)
api := group.Group("/api")
{
SetupMiddlewares(api)