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 97d4568 commit 8357111
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,11 +270,35 @@ func main() {
e := echo.New()
e.Pre(middleware.RemoveTrailingSlash())
e.Pre(middleware.GzipWithConfig(middleware.GzipConfig{MinLength: 2048}))
e.Use(middleware.ProxyWithConfig(middleware.ProxyConfig{
Rewrite: map[string]string{
"/play": "/",
},
}))

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)

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

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

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

0 comments on commit 8357111

Please sign in to comment.