The Static Unit
Tells the underlying Express app to serve static requests from the specified directory and initializes the express-favicon package.
constructor(String static_assets_dir = './app/assets')
Initializes the class. Resolves the fully qualified directory of the static assets (
static_assets_dir) and stores it in
go(express app, function next)
Tells the underlying Express app to serve
this.static_asset_directory as static under the base route
/assets by calling
express.static. Configures the underlying Express install to use the express-favicon package to serve the
favicon.ico file in
this.static_asset_directory. This establishes the
Static context and calls the
next function in the stack under it.
Object describing the services, templates, and directories provided by this unit. They are as follows:
||The name of the service. This is added to the
||The fully-qualified path of the static asset files. This is added to the
Set on initialization. Specifies the the fully-qualified path of the static assets. Files in this directory are served by Express statically.
This context guarantees that the underlying Express install is configured to serve the files in the specified assets directory with the
/assets route prefix.