Initial commit
This commit is contained in:
commit
60811f6f3b
|
@ -0,0 +1,7 @@
|
|||
*.json
|
||||
*.csv
|
||||
*.log
|
||||
*.db
|
||||
*.sum
|
||||
*.sqlite3
|
||||
var/
|
|
@ -0,0 +1,24 @@
|
|||
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"))
|
||||
}
|
Loading…
Reference in New Issue