Skip to content

bbfpl/go-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-server

go+gin+mysql+redis+websocket

chat-client提供api和ws服务

目录结构

.
├─app
│  ├─controller
│  │      user.go
│  │
│  ├─models
│  │      user.go
│  │
│  ├─router
│  │      router.go
│  │
│  └─wschat.gogame.go
│
├─confconfig.yaml
│
├─library
│  │  config.go
│  │  db.go
│  │  jwt.go
│  │  util.go
│  │
│  └─redispool.goutil.go
│
└─public
    ├─static
    └─web

第三方模块列表

json web token 模块
	github.com/dgrijalva/jwt-go

redis
	github.com/garyburd/redigo

web 框架
	github.com/gin-gonic/gin

orm 框架
	github.com/jinzhu/gorm
	github.com/go-sql-driver/mysql

监听config.yaml是否改变,用于热更新
	github.com/fsnotify/fsnotify
	github.com/spf13/viper

melody封装了websocket
	gopkg.in/olahol/melody.v1

预览 go run main.go 运行服务

1

聊天时的数据

2

游戏时的数据

3

About

go+gin+mysql+redis+websocket

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages