adding summarization and restructure project
This commit is contained in:
19
golang/cmd/frontend/routes.go
Normal file
19
golang/cmd/frontend/routes.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
func (app *App) routes() http.Handler {
|
||||
mux := http.NewServeMux()
|
||||
|
||||
// dynamic routes
|
||||
mux.HandleFunc("GET /", app.Index)
|
||||
mux.HandleFunc("POST /up/search", app.UpSearch)
|
||||
|
||||
// serve files from the "static" directory
|
||||
fs := http.FileServer(http.Dir("assets/static"))
|
||||
mux.Handle("GET /static/", http.StripPrefix("/", fs))
|
||||
|
||||
return mux
|
||||
}
|
||||
Reference in New Issue
Block a user