mirror of
https://codeberg.org/SafeTwitch/safetwitch-backend.git
synced 2024-12-22 13:13:00 -05:00
Unix socket support
This commit is contained in:
parent
5c5da5404a
commit
14cf1284a1
1 changed files with 7 additions and 1 deletions
8
main.go
8
main.go
|
@ -48,6 +48,12 @@ func main() {
|
||||||
router.Use(ErrorHandler)
|
router.Use(ErrorHandler)
|
||||||
routes.SetRoutes(router)
|
routes.SetRoutes(router)
|
||||||
router.NoRoute(notFoundHandler)
|
router.NoRoute(notFoundHandler)
|
||||||
|
|
||||||
log.Println("Safetwitch API running")
|
log.Println("Safetwitch API running")
|
||||||
router.Run()
|
env = os.Getenv("PORT")
|
||||||
|
if strings.Contains(env, "/") {
|
||||||
|
router.RunUnix(env)
|
||||||
|
} else {
|
||||||
|
router.Run()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue