12345678910111213141516171819202122232425262728293031323334353637 |
- /*
- * @Descripttion:
- * @version:
- * @Author: Neo,Huang
- * @Date: 2020-12-16 11:22:56
- * @LastEditors: Neo,Huang
- * @LastEditTime: 2022-04-27 20:20:13
- */
- package main
- import (
- "net/http"
- "github.com/astaxie/beego"
- "github.com/drone/routes"
- "box-3rdServer/sensitive"
- "box-3rdServer/utils"
- )
- func main() {
- utils.InitProject()
- utils.InitRedis()
- mux := routes.New()
- // 敏感词
- sensitive.Init()
- mux.Get("/sensitive/checkword", sensitive.HttpCheckWord)
- mux.Post("/sensitive/checkword", sensitive.HttpCheckWord)
- mux.Get("/sensitive/changeword", sensitive.HttpChangeWord)
- mux.Post("/sensitive/changeword", sensitive.HttpChangeWord)
- http.Handle("/", mux)
- http.ListenAndServe(":"+beego.AppConfig.String("httpport"), nil)
- }
|