~reesmichael1/chantpointer

ref: a8ef912ffa71a1d7e47d0010ae63f714f580b8d7 chantpointer/main.go -rw-r--r-- 361 bytes
a8ef912f — Michael Rees Only build on master 2 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))
}