Re-enable dev server
This commit is contained in:
parent
c57cc6ad12
commit
9404a848ad
12
main.go
12
main.go
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue