main.go 612 B

12345678910111213141516171819202122232425
  1. package main
  2. import (
  3. "fmt"
  4. "github.com/spf13/viper"
  5. _ "trading-go/common"
  6. "trading-go/routine"
  7. )
  8. // @title 二手交易
  9. // @version 1.0
  10. // @description 一个基于微信小程序的校园二手交易平台的api文档
  11. // @termsOfService http://swagger.io/terms/
  12. // @license.name Apache 2.0
  13. // @license.url http://www.apache.org/licenses/LICENSE-2.0.html
  14. // @host 124.222.126.172:8084
  15. // @BasePath /WeChatTrading/trading-go
  16. func main() {
  17. r := routine.GetRoutine()
  18. port := viper.GetString("web.port")
  19. fmt.Println("[api文档] =====>>> http://124.222.126.172:8084/swagger/index.html#/")
  20. r.Run(port)
  21. }