Share

websocket

Public

09 October 2017

Views: 16

package main

import (
"log"
"net/http"

"./chat"
)

func main() {
log.SetFlags(log.Lshortfile)

// websocket server
server := chat.NewServer("/entry")
go server.Listen()

// static files
http.Handle("/", http.FileServer(http.Dir("webroot")))

log.Fatal(http.ListenAndServe(":8080", nil))
}

pastelink.net/fullykn0ly

Advertisement

Disable Third Party Ads