MCPcopy Create free account
hub / github.com/devfeel/dotweb / RegisterServerFile

Method RegisterServerFile

server.go:369–371  ·  view source on GitHub ↗

RegisterServerFile a shortcut for router.RegisterServerFile(routeMethod, path, fileRoot) simple demo:server.RegisterServerFile(RouteMethod_GET, "/src/*", "/var/www", nil) simple demo:server.RegisterServerFile(RouteMethod_GET, "/src/*filepath", "/var/www", []string{".zip", ".rar"})

(routeMethod string, path string, fileRoot string, excludeExtension []string)

Source from the content-addressed store, hash-verified

367// simple demo:server.RegisterServerFile(RouteMethod_GET, "/src/*", "/var/www", nil)
368// simple demo:server.RegisterServerFile(RouteMethod_GET, "/src/*filepath", "/var/www", []string{".zip", ".rar"})
369func (server *HttpServer) RegisterServerFile(routeMethod string, path string, fileRoot string, excludeExtension []string) RouterNode {
370 return server.Router().RegisterServerFile(routeMethod, path, fileRoot, excludeExtension)
371}
372
373// HiJack is a shortcut for router.HiJack(path, handle)
374func (server *HttpServer) HiJack(path string, handle HttpHandle) {

Callers

nothing calls this directly

Calls 2

RouterMethod · 0.95
RegisterServerFileMethod · 0.65

Tested by

no test coverage detected