main.go 739 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * @Descripttion:
  3. * @version:
  4. * @Author: Neo,Huang
  5. * @Date: 2020-12-16 11:22:56
  6. * @LastEditors: Neo,Huang
  7. * @LastEditTime: 2022-04-27 20:20:13
  8. */
  9. package main
  10. import (
  11. "net/http"
  12. "github.com/astaxie/beego"
  13. "github.com/drone/routes"
  14. "box-3rdServer/sensitive"
  15. "box-3rdServer/utils"
  16. )
  17. func main() {
  18. utils.InitProject()
  19. utils.InitRedis()
  20. mux := routes.New()
  21. // 敏感词
  22. sensitive.Init()
  23. mux.Get("/sensitive/checkword", sensitive.HttpCheckWord)
  24. mux.Post("/sensitive/checkword", sensitive.HttpCheckWord)
  25. mux.Get("/sensitive/changeword", sensitive.HttpChangeWord)
  26. mux.Post("/sensitive/changeword", sensitive.HttpChangeWord)
  27. http.Handle("/", mux)
  28. http.ListenAndServe(":"+beego.AppConfig.String("httpport"), nil)
  29. }