Skip to content

nightlegend/hi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Apr 18, 2018
f096da4 · Apr 18, 2018

History

18 Commits
Apr 18, 2018
Apr 4, 2018
Apr 6, 2018
Apr 4, 2018
Apr 18, 2018
Apr 4, 2018
Apr 10, 2018
Apr 18, 2018
Apr 6, 2018
Apr 4, 2018
Apr 6, 2018
Apr 6, 2018
Apr 4, 2018
Apr 18, 2018
Apr 4, 2018
Apr 6, 2018

Repository files navigation

"HI" socket server

Build Status codecov

"HI" written in Go (Golang). If you need a socket server, you will love "HI".

socket process

SOCKET

Start using it

$ git clone https://github.com/nightlegend/hi.git

Use a vendor tool like Govendor

  1. go get govendor
$ go get github.com/kardianos/govendor
  1. Create your project folder and cd inside
$ mkdir -p $GOPATH/src/github.com/myusername/project && cd "$_"
  1. Vendor init your project and add gin
$ govendor init
$ govendor add +external
$ govendor install +local
  1. Start redis server

redis

  1. Configure your redis server connection.
func NewCli() (*redis.Client, error) {
	client := redis.NewClient(&redis.Options{
		Addr:     "localhost:6379",
		Password: "", // no password set
		DB:       0,  // use default DB
	})
	err := client.Ping().Err()
	return client, err
}
  1. Run your project
$ go run server.go

Releases

No releases published

Packages

No packages published

Languages