MCPcopy Create free account
hub / github.com/dinofizz/diskplayer / RunRecordServer

Method RunRecordServer

server.go:46–53  ·  view source on GitHub ↗

RunRecordServer creates a web server running on the port defined in the configuration file under the recorder. server_port field. Files are served directly from the "static" folder.

()

Source from the content-addressed store, hash-verified

44// server_port field.
45// Files are served directly from the "static" folder.
46func (s *RealDiskplayerServer) RunRecordServer() error {
47 p := ConfigValue(RECORD_SERVER_PORT)
48 fs := http.FileServer(http.Dir("static"))
49 http.Handle("/static/", http.StripPrefix("/static/", fs))
50 http.HandleFunc("/", indexHandler)
51 http.HandleFunc("/record", recordHandler)
52 return http.ListenAndServe(":"+p, nil)
53}
54
55// RunCallbackServer creates a web server running on the port defined in the configuration file under the spotify.
56// callback_url field.

Callers

nothing calls this directly

Calls 1

ConfigValueFunction · 0.85

Tested by

no test coverage detected