main.go 443 B

12345678910111213141516171819202122232425
  1. package main
  2. import (
  3. "context"
  4. "file_upload/backend/app"
  5. "file_upload/backend/global"
  6. "file_upload/backend/simple_zap"
  7. )
  8. func init() {
  9. err := global.SetupSetting()
  10. if err != nil {
  11. simple_zap.WithCtx(context.Background()).Sugar().Warn(err)
  12. return
  13. }
  14. global.SetupMongo()
  15. //global.SetupRedisLink()
  16. }
  17. func main() {
  18. err := app.InitRouter()
  19. if err != nil {
  20. simple_zap.WithCtx(context.Background()).Sugar().Warn(err)
  21. return
  22. }
  23. }