Class DynamicFileServer
java.lang.Object
com.pixelservices.flash.components.fileserver.DynamicFileServer
Serves dynamic files from either the filesystem or a resource stream.
Supports single-page applications with an entrypoint fallback.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
serve
(String endpoint, DynamicFileServerConfiguration config, Class<?> contextClass) Serves files dynamically from a filesystem path or a resource folder.
-
Constructor Details
-
DynamicFileServer
Constructs the dynamic file server.- Parameters:
server
- the server to register routes to
-
-
Method Details
-
serve
Serves files dynamically from a filesystem path or a resource folder.- Parameters:
endpoint
- the base URL endpointconfig
- the configuration objectcontextClass
- optional class used for loading resources (for RESOURCESTREAM)
-