mirror of
https://github.com/mgerb/mywebsite
synced 2026-01-11 18:32:50 +00:00
setting up folder structures
This commit is contained in:
22
route/route.go
Normal file
22
route/route.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package route
|
||||
|
||||
import (
|
||||
//"encoding/json"
|
||||
//"fmt"
|
||||
"github.com/julienschmidt/httprouter"
|
||||
"net/http"
|
||||
|
||||
"github.com/mgerb42/mywebsite/controller"
|
||||
)
|
||||
|
||||
func Routes() *httprouter.Router {
|
||||
|
||||
r := httprouter.New()
|
||||
|
||||
r.GET("/", controller.IndexGet)
|
||||
|
||||
//set up public folder path
|
||||
r.ServeFiles("/public/*filepath", http.Dir("./public"))
|
||||
|
||||
return r
|
||||
}
|
||||
Reference in New Issue
Block a user