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
}
