用Martini、websocket实现单机版聊天室

ChatRoom

A stand-alone ChatRoom in Martini

Please Star

https://github.com/renleimlj/ChatRoom

Interface

Usage

  • install Martini

      go get github.com/go-martini/martini
    
  • install websocket

      go get github.com/gorilla/websocket
    
  • install this ChatRoom

      go get github.com/renleimlj/ChatRoom
    
  • use this ChatRoom

      go run main.go
    

open your browser and inout http://localhost:3000/

  • shut down this ChatRoom

原文地址:https://www.cnblogs.com/renleimlj/p/7786755.html