simplemq/cmd/server/main.go

16 lines
260 B
Go
Raw Normal View History

2021-11-15 23:06:05 +00:00
package main
import (
2021-11-17 00:26:51 +00:00
"go.digitalcircle.com.br/open/simplemq/lib/smqsvr"
2021-11-15 23:06:05 +00:00
"net/http"
)
func main() {
2021-11-17 00:26:51 +00:00
http.HandleFunc("/ws", smqsvr.Serve)
http.HandleFunc("/stats", smqsvr.Stats)
2021-11-15 23:06:05 +00:00
err := http.ListenAndServe(":8080", nil)
if err != nil {
panic(err)
}
}