aboutsummaryrefslogtreecommitdiffhomepage
path: root/backend/main.go
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-08-17 21:11:07 +0900
committernsfisis <nsfisis@gmail.com>2024-08-17 21:11:07 +0900
commit01d3120fd7129f573d88f7aa7c227b3ef93fe368 (patch)
treeeea4f5ac0f025c7bdbff71d2ee83b4dce99355ef /backend/main.go
parentf926ef682de637b717d3b0cc0eaee43c59e83c95 (diff)
parentb923a9d6534820d33f42bc65c47ae22889bde922 (diff)
downloadphperkaigi-2025-albatross-01d3120fd7129f573d88f7aa7c227b3ef93fe368.tar.gz
phperkaigi-2025-albatross-01d3120fd7129f573d88f7aa7c227b3ef93fe368.tar.zst
phperkaigi-2025-albatross-01d3120fd7129f573d88f7aa7c227b3ef93fe368.zip
Merge branch 'feat/icon'
Diffstat (limited to 'backend/main.go')
-rw-r--r--backend/main.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/backend/main.go b/backend/main.go
index 3296957..890e666 100644
--- a/backend/main.go
+++ b/backend/main.go
@@ -96,6 +96,15 @@ func main() {
return c.Redirect(http.StatusPermanentRedirect, "http://localhost:5173/iosdc-japan/2024/code-battle/logout")
})
+ // For local dev: This is never used in production because the reverse
+ // proxy directly handles /files.
+ filesGroup := e.Group("/iosdc-japan/2024/code-battle/files")
+ filesGroup.Use(middleware.StaticWithConfig(middleware.StaticConfig{
+ Root: "/",
+ Filesystem: http.Dir("/data/files"),
+ IgnoreBase: true,
+ }))
+
go gameHubs.Run()
go func() {