Decouple chat from core and add chat rest api (#25)
* Decouple the chat package from the core * Add rest api endpoints for the chat aspect
This commit is contained in:
@@ -14,9 +14,8 @@ import (
|
||||
|
||||
//Start starts the router for the http, ws, and rtmp
|
||||
func Start() error {
|
||||
// websocket server
|
||||
chatServer := chat.NewServer()
|
||||
go chatServer.Listen()
|
||||
// websocket chat server
|
||||
go chat.Start()
|
||||
|
||||
// start the rtmp server
|
||||
go rtmp.Start()
|
||||
@@ -27,6 +26,9 @@ func Start() error {
|
||||
// status of the system
|
||||
http.HandleFunc("/status", controllers.GetStatus)
|
||||
|
||||
// chat rest api
|
||||
http.HandleFunc("/chat", controllers.GetChatMessages)
|
||||
|
||||
port := config.Config.WebServerPort
|
||||
|
||||
log.Printf("Starting public web server on port: %d", port)
|
||||
|
||||
Reference in New Issue
Block a user