Skip to content

Commit

Permalink
sorry: no longer hosting it
Browse files Browse the repository at this point in the history
  • Loading branch information
kevincobain2000 committed Oct 17, 2024
1 parent a9e4ff3 commit bec3cf7
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions pkg/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package pkg

import (
"github.com/labstack/echo/v4"
"github.com/labstack/echo/v4/middleware"
)

func SetupRoutes(e *echo.Echo, options []EchoOption) {
Expand All @@ -14,12 +13,21 @@ func SetupRoutes(e *echo.Echo, options []EchoOption) {
}
}
e.GET(opt.BaseURL+"", NewAssetsHandler(opt.PublicDir, "index.html").GetHTML)
e.GET(opt.BaseURL+"extract", NewAssetsHandler(opt.PublicDir, "extract/index.html").GetHTML)
// no longer providing it as a service
// e.GET(opt.BaseURL+"extract", NewAssetsHandler(opt.PublicDir, "extract/index.html").GetHTML)

e.GET(opt.BaseURL+"extract", func(c echo.Context) error {
return c.Redirect(301, "https://github.com/kevincobain2000/email_extractor")
})
e.GET(opt.BaseURL+"ads.txt", NewAssetsHandler(opt.PublicDir, "ads.txt").GetPlain)
e.GET(opt.BaseURL+"robots.txt", NewAssetsHandler(opt.PublicDir, "robots.txt").GetPlain)
e.GET(opt.BaseURL+"favicon.ico", NewAssetsHandler(opt.PublicDir, "favicon.ico").GetIco)
e.GET(opt.BaseURL+"api/extract",
NewExtractHandler().Get,
middleware.RateLimiter(middleware.NewRateLimiterMemoryStore(50)),
)
// no longer providing it as a service
// e.GET(opt.BaseURL+"api/extract",
// NewExtractHandler().Get,
// middleware.RateLimiter(middleware.NewRateLimiterMemoryStore(50)),
// )
e.GET(opt.BaseURL+"api/extract", func(c echo.Context) error {
return c.Redirect(301, "https://github.com/kevincobain2000/email_extractor")
})
}

0 comments on commit bec3cf7

Please sign in to comment.