<commit_before>package main

import (
	"fmt"
	"net/http"
	"log"
	"github.com/liam-lai/ptt-alertor/hello"
)

func index(w http.ResponseWriter, r *http.Request) {
    fmt.Println(r.RemoteAddr + " visit: " + r.RequestURI)
    fmt.Fprintf(w, hello.HelloWorld())
}

func main() {
    http.HandleFunc("/", index)
    err := http.ListenAndServe(":9090", nil)
    if err != nil {
        log.Fatal("ListenAndServer ", err)
    }
}<commit_msg>add board http route<commit_after>package main

import (
	"fmt"
	"log"
	"net/http"

	"github.com/liam-lai/ptt-alertor/hello"
	"github.com/liam-lai/ptt-alertor/pttboard"
)

func index(w http.ResponseWriter, r *http.Request) {
	fmt.Println(r.RemoteAddr + " visit: " + r.RequestURI)
	fmt.Fprintf(w, hello.HelloWorld())
}

func board(w http.ResponseWriter, r *http.Request) {
	fmt.Fprintf(w, "%s", pttboard.FirstPage("FREE_BOX"))
}

func main() {
	http.HandleFunc("/", index)
	http.HandleFunc("/board", board)
	err := http.ListenAndServe(":9090", nil)
	if err != nil {
		log.Fatal("ListenAndServer ", err)
	}
}
{'fraction_non_alphanumeric': 0.17884615384615385, 'fraction_numerical': 0.007692307692307693, 'mean_word_length': 3.9571428571428573, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5542023', 'n_tokens_mistral': 425, 'n_tokens_neox': 413, 'n_words': 72}