main.go 585 B

1234567891011121314151617181920212223242526272829
  1. package main
  2. import (
  3. "city_chips/cmd/server/wire"
  4. "city_chips/pkg/config"
  5. "city_chips/pkg/helper/hikvision"
  6. "city_chips/pkg/http"
  7. "city_chips/pkg/log"
  8. "fmt"
  9. "go.uber.org/zap"
  10. )
  11. func main() {
  12. conf := config.NewConfig()
  13. logger := log.NewLog(conf)
  14. logger.Info("server start", zap.String("host", "http://127.0.0.1:"+conf.GetString("http.port")))
  15. app, cleanup, err := wire.NewWire(conf, logger)
  16. if err != nil {
  17. panic(err)
  18. }
  19. conf.GetString("")
  20. //aes.ExampleUsage()
  21. hikvision.Hikvision()
  22. defer cleanup()
  23. http.Run(app, fmt.Sprintf(":%d", conf.GetInt("http.port")))
  24. }