routing
- Description:
- Server routing utilities.
 
- Source:
Methods
(static) addStaticDirectory(router, staticDir)
- Description:
- Add a static route to the router.
 
- Source:
Parameters:
| Name | Type | Description | 
|---|---|---|
| router | express.app | The router to add the route to. | 
| staticDir | string | The path to the static directory to add | 
(static) getLocalIP() → {string}
- Source:
Returns:
    The first valid local non-internal IPv4 address it finds.
- Type
- string
(static) listen(server, hostopt, portopt)
- Description:
- Start listening to the given host and port with the given server, and log some helpful information to the console.
 
- Source:
Parameters:
| Name | Type | Attributes | Default | Description | 
|---|---|---|---|---|
| server | http.Server | The server to start listening on. | ||
| host | string | <optional> | 'localhost' | The host to listen on. | 
| port | number | <optional> | 9000 | The port to listen on. | 
(static) router() → {express.app}
- Description:
- This function wraps a layer of abstraction around the route handler. It will set up the main routes for a WAMS app before returning, so that those routes will get priority.
 
- Source:
Returns:
    An express app with main WAMS routes established.
- Type
- express.app