Constructor
new LinoApp(optionsopt)
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
<optional> |
Application options Properties
|
Classes
Methods
delete(path, handler, metaopt) → {LinoApp}
Register a DELETE handler.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
path |
string | Path pattern |
|
handler |
function | Route handler |
|
meta |
object |
<optional> |
Description metadata |
Returns:
This application, for chaining
- Type
- LinoApp
describe() → {object}
The native service description of specification ยง9.
Returns:
Description document
- Type
- object
get(path, handler, metaopt) → {LinoApp}
Register a GET handler.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
path |
string | Path pattern |
|
handler |
function | Route handler |
|
meta |
object |
<optional> |
Description metadata |
Returns:
This application, for chaining
- Type
- LinoApp
getExpressApp() → {object}
The underlying Express application, usable as a request listener.
Returns:
Express application
- Type
- object
listen(port, callbackopt) → {object}
Start an HTTP server.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
port |
number | Port to listen on |
|
callback |
function |
<optional> |
Called once the server is listening |
Returns:
Node HTTP server
- Type
- object
openapi() → {object}
The OpenAPI 3.1 rendering of the service description.
Returns:
OpenAPI document
- Type
- object
patch(path, handler, metaopt) → {LinoApp}
Register a PATCH handler.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
path |
string | Path pattern |
|
handler |
function | Route handler |
|
meta |
object |
<optional> |
Description metadata |
Returns:
This application, for chaining
- Type
- LinoApp
post(path, handler, metaopt) → {LinoApp}
Register a POST handler.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
path |
string | Path pattern |
|
handler |
function | Route handler |
|
meta |
object |
<optional> |
Description metadata |
Returns:
This application, for chaining
- Type
- LinoApp
put(path, handler, metaopt) → {LinoApp}
Register a PUT handler.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
path |
string | Path pattern |
|
handler |
function | Route handler |
|
meta |
object |
<optional> |
Description metadata |
Returns:
This application, for chaining
- Type
- LinoApp
resource(path, store, optionsopt) → {LinoApp}
Register a CRUD resource, see registerResource.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
path |
string | Collection path |
|
store |
object | Resource store |
|
options |
object |
<optional> |
Resource options |
Returns:
This application, for chaining
- Type
- LinoApp
route(method, path, handler, metaopt) → {LinoApp}
Register a handler for a method and path.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
method |
string | HTTP method |
|
path |
string | Path pattern |
|
handler |
function | Route handler |
|
meta |
object |
<optional> |
Description metadata, for example |
Returns:
This application, for chaining
- Type
- LinoApp
use(…args) → {LinoApp}
Add Express middleware to the user router.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
args |
any |
<repeatable> |
Middleware arguments |
Returns:
This application, for chaining
- Type
- LinoApp