mirror of
https://github.com/flavioribeiro/donut.git
synced 2025-10-05 15:06:51 +08:00
split components
This commit is contained in:
16
internal/web/router.go
Normal file
16
internal/web/router.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package handlers
|
||||
|
||||
import "net/http"
|
||||
|
||||
func NewServeMux(
|
||||
index *IndexHandler,
|
||||
signaling *SignalingHandler,
|
||||
) *http.ServeMux {
|
||||
|
||||
mux := http.NewServeMux()
|
||||
|
||||
mux.Handle("/", index)
|
||||
mux.Handle("/doSignaling", signaling)
|
||||
|
||||
return mux
|
||||
}
|
Reference in New Issue
Block a user