holly molly
This commit is contained in:
26
cmd/main.go
Normal file
26
cmd/main.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"clock"
|
||||
// "clock/imageutils"
|
||||
)
|
||||
|
||||
func Check(err error) {
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
func main() {
|
||||
addrwithport := "localhost:1488"
|
||||
http.HandleFunc("/",
|
||||
func(w http.ResponseWriter, req *http.Request){
|
||||
clock.Time(w)
|
||||
},
|
||||
)
|
||||
|
||||
println("this thingy running on", addrwithport)
|
||||
Check(http.ListenAndServe(addrwithport, nil))
|
||||
}
|
Reference in New Issue
Block a user