~reesmichael1/chantpointer

ref: 86f7c6428b606055f352a0abbc3f65ab7cb99edd chantpointer/main.go -rw-r--r-- 361 bytes
86f7c642 — Michael Rees List files in build directory 3 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package main

import (
	"log"
	"net/http"
)

func main() {
	static := http.FileServer(http.Dir("static"))
	http.Handle("/static/", http.StripPrefix("/static", static))
	http.HandleFunc("/chant/", ChantHandler)
	http.Handle("/generate", ErrorHandler(GenerateHandler))
	http.Handle("/", ErrorHandler(IndexHandler))
	log.Fatal(http.ListenAndServe(":8080", nil))
}