The main logic for initializing an instance of the lib.reviews Express web application.
Methods
(async, static) getApp(dbopt) → {function}
Initialize an instance of the app and provide it when it is ready for use.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
db |
Thinky |
<optional> |
default database instance | a reference to an ODM instance with an active connection pool. If not provided, we will attempt to acquire the configured instance. |
Returns:
an Express app
- Type
- function
(async, static) setupDirectory(dir)
Create a directory if it does not exist
Parameters:
Name | Type | Description |
---|---|---|
dir |
String | relative path name |