You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
414 B

4 years ago
  1. package app
  2. import (
  3. "fmt"
  4. "git.aiterp.net/lucifer/server3/app/api"
  5. "git.aiterp.net/lucifer/server3/app/config"
  6. "git.aiterp.net/lucifer/server3/app/services"
  7. "github.com/gin-gonic/gin"
  8. "log"
  9. )
  10. func StartServer() {
  11. services.StartEventHandler()
  12. gin.SetMode(gin.ReleaseMode)
  13. ginny := gin.New()
  14. api.Events(ginny.Group("/api/events"))
  15. log.Fatal(ginny.Run(fmt.Sprintf("0.0.0.0:%d", config.ServerPort)))
  16. }