Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Commit

Permalink
Work in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
skhaz committed Nov 16, 2023
1 parent b5fae62 commit 387eb55
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,14 +271,14 @@ func bundleHandler(c echo.Context) error {
func main() {
e := echo.New()
e.Pre(middleware.RemoveTrailingSlash())
e.Pre(middleware.Rewrite(map[string]string{"/play/*": "/$1"}))
e.Pre(middleware.GzipWithConfig(middleware.GzipConfig{MinLength: 2048}))

e.GET("/:runtime/:org/:repo/:release", indexHandler)
e.GET("/:runtime/:org/:repo/:release/carimbo.js", javaScriptHandler)
e.GET("/:runtime/:org/:repo/:release/carimbo.wasm", webAssemblyHandler)
e.GET("/:runtime/:org/:repo/:release/bundle.zip", bundleHandler)
e.GET("/favicon.ico", favIconHandler)
g := e.Group("/play")
g.GET("/:runtime/:org/:repo/:release", indexHandler)
g.GET("/:runtime/:org/:repo/:release/carimbo.js", javaScriptHandler)
g.GET("/:runtime/:org/:repo/:release/carimbo.wasm", webAssemblyHandler)
g.GET("/:runtime/:org/:repo/:release/bundle.zip", bundleHandler)
g.GET("/favicon.ico", favIconHandler)

e.Logger.Fatal(e.Start(fmt.Sprintf(":%s", os.Getenv("PORT"))))
}

0 comments on commit 387eb55

Please sign in to comment.