commit
60811f6f3b
3 changed files with 38 additions and 0 deletions
@ -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")) |
|||
} |
@ -0,0 +1,7 @@ |
|||
module st.fai.purein |
|||
|
|||
go 1.19 |
|||
|
|||
require ( |
|||
github.com/julienschmidt/httprouter v1.3.0 |
|||
) |
Loading…
Reference in new issue