Re-enable dev server

This commit is contained in:
Chandler Swift 2021-10-19 00:36:02 -05:00
parent c57cc6ad12
commit 9404a848ad
Signed by: chandlerswift
GPG key ID: A851D929D52FB93F

12
main.go
View file

@ -147,7 +147,7 @@ func main() {
const ( const (
geckoDriverPath = "deps/geckodriver" geckoDriverPath = "deps/geckodriver"
geckoDriverPort = 8080 geckoDriverPort = 8081
) )
opts := []selenium.ServiceOption{ opts := []selenium.ServiceOption{
@ -170,12 +170,12 @@ func main() {
if *serve { if *serve {
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
// err := generateHTML(w, *largest, wd) err = generateHTML(getSites(*largest, wd), w)
// if err != nil { if err != nil {
// w.Write([]byte(err.Error())) w.Write([]byte(err.Error()))
// } }
}) })
fmt.Printf("Serving on %v\n", port) fmt.Printf("Serving on %v\n", *port)
log.Fatal(http.ListenAndServe(fmt.Sprintf(":%v", *port), nil)) log.Fatal(http.ListenAndServe(fmt.Sprintf(":%v", *port), nil))
} else { } else {
file, err := os.Create(*filename) file, err := os.Create(*filename)