servechi

package
v0.0.0-...-37abd50 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Pd = common.ConstParams{
	Year:      2022,
	Logo:      "https://cdn.jsdelivr.net/gh/go-chi/chi@master/_examples/chi.svg",
	Framework: "Chi",
}

Pd is unchanging parameter data shared between all routes.

Functions

func FileServer

func FileServer(r chi.Router, path string, root http.FileSystem)

FileServer conveniently sets up a http.FileServer handler to serve static files from a http.FileSystem. Taken from github.com/go-chi/chi/blob/master/_examples/fileserver/main.go

func RegisterRoutes

func RegisterRoutes()

RegisterRoutes registers all decoupled routes used by servechi. Shared with cmd/exercise. Right now, this func has the same behavior as servestd.RegisterRoutes

func Setup

func Setup() chi.Router

Setup loads templates, sets up routes, etc.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL