Initial commit

This commit is contained in:
Dendy 2023-05-11 17:37:03 +02:00
commit 60811f6f3b
3 changed files with 38 additions and 0 deletions

7
.gitignore vendored Normal file
View File

@ -0,0 +1,7 @@
*.json
*.csv
*.log
*.db
*.sum
*.sqlite3
var/

24
cmd/purein/purein.go Normal file
View File

@ -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"))
}

7
go.mod Normal file
View File

@ -0,0 +1,7 @@
module st.fai.purein
go 1.19
require (
github.com/julienschmidt/httprouter v1.3.0
)