Members
(readonly) ExpressAppType :number
Enum for app 'type'
Type:
- number
- Source:
(readonly) defaultExpressAppConfig
Sets the default created express app config
- Source:
Methods
errorMiddleware(message) → {RequestHandler}
Basic error reporting middleware
Parameters:
Name | Type | Description |
---|---|---|
message |
string | custom message to show on error |
- Source:
Returns:
middleware function
- Type
- RequestHandler
expressApp(app) → {Express}
Creates and setup a brand new express powered app
Parameters:
Name | Type | Description |
---|---|---|
app |
ExpressAppConfig | configuration object |
- Source:
Returns:
ready to use express app
- Type
- Express
notFoundMiddleware(middleware) → {RequestHandler}
simple page not found middleware
Parameters:
Name | Type | Description |
---|---|---|
middleware |
NotFoundMiddlewareConfig | configuration object |
- Source:
Returns:
middleware function
- Type
- RequestHandler
stringGenerator(length) → {string}
Generates a random string with letters and numbers
Parameters:
Name | Type | Description |
---|---|---|
length |
number | string desired length |
- Source:
Returns:
result the generated string
- Type
- string