aboutsummaryrefslogtreecommitdiffhomepage
path: root/worker/main.go
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-03-08 10:51:41 +0900
committernsfisis <nsfisis@gmail.com>2025-03-08 10:51:41 +0900
commita7ce31249948e4f0c1950de93f3c4f7cdda51cf4 (patch)
treec4c740f0cccd15f825596f7a115f3b8f8eb8ffa7 /worker/main.go
parent7f4d16dca85263dcbc7b3bb29f5fc50f4371739d (diff)
parentc06d46eae30c9468535fb6af5e9b822acadbbdb6 (diff)
downloadphperkaigi-2025-albatross-a7ce31249948e4f0c1950de93f3c4f7cdda51cf4.tar.gz
phperkaigi-2025-albatross-a7ce31249948e4f0c1950de93f3c4f7cdda51cf4.tar.zst
phperkaigi-2025-albatross-a7ce31249948e4f0c1950de93f3c4f7cdda51cf4.zip
Merge branch 'phperkaigi-2025'
Diffstat (limited to 'worker/main.go')
-rw-r--r--worker/main.go39
1 files changed, 0 insertions, 39 deletions
diff --git a/worker/main.go b/worker/main.go
deleted file mode 100644
index ac65305..0000000
--- a/worker/main.go
+++ /dev/null
@@ -1,39 +0,0 @@
-package main
-
-import (
- "log"
- "net/http"
- "os"
-
- echojwt "github.com/labstack/echo-jwt/v4"
- "github.com/labstack/echo/v4"
- "github.com/labstack/echo/v4/middleware"
-)
-
-func main() {
- jwtSecret := os.Getenv("ALBATROSS_JWT_SECRET")
- if jwtSecret == "" {
- log.Fatal("ALBATROSS_JWT_SECRET is not set")
- }
-
- if err := prepareDirectories(); err != nil {
- log.Fatal(err)
- }
-
- e := echo.New()
-
- e.Use(middleware.Logger())
- e.Use(middleware.Recover())
-
- e.Use(echojwt.WithConfig(echojwt.Config{
- SigningKey: []byte(jwtSecret),
- }))
-
- e.POST("/api/swiftc", handleSwiftCompile)
- e.POST("/api/wasmc", handleWasmCompile)
- e.POST("/api/testrun", handleTestRun)
-
- if err := e.Start(":80"); err != http.ErrServerClosed {
- log.Fatal(err)
- }
-}