entrepa/cmd/entrepad/entrepad.go

25 lines
443 B
Go

package main
import (
"log"
"net/http"
"github.com/julienschmidt/httprouter"
)
func main() {
router := httprouter.New()
//router.ServeFiles("/static/*filepath", http.Dir("web/static"))
router.GET("/", getHandler)
println("Starting server...")
log.Fatal(http.ListenAndServe(":5080", router))
println("Server closed")
}
func getHandler(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
w.Write([]byte("heyhey"))
}