mirror of https://github.com/synctv-org/synctv
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
498 B
Go
26 lines
498 B
Go
package server
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
"github.com/synctv-org/synctv/cmd/flags"
|
|
"github.com/synctv-org/synctv/server/handlers"
|
|
"github.com/synctv-org/synctv/server/middlewares"
|
|
auth "github.com/synctv-org/synctv/server/oauth2"
|
|
"github.com/synctv-org/synctv/server/static"
|
|
)
|
|
|
|
func Init(e *gin.Engine) {
|
|
middlewares.Init(e)
|
|
auth.Init(e)
|
|
handlers.Init(e)
|
|
if !flags.Server.DisableWeb {
|
|
static.Init(e)
|
|
}
|
|
}
|
|
|
|
func NewAndInit() (e *gin.Engine) {
|
|
e = gin.New()
|
|
Init(e)
|
|
return
|
|
}
|