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.
()
| 44 | // server_port field. |
| 45 | // Files are served directly from the "static" folder. |
| 46 | func (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. |
nothing calls this directly
no test coverage detected