@argodigital/formula-sl-function
v1.1.1
Published
Module's providing [Serverless component](https://www.github.com/serverless/components) that builds FasS function that handle REST requests. All together, beside deploying function, it:
Downloads
7
Maintainers
Keywords
Readme
formula-sl-function
Module's providing Serverless component that builds FasS function that handle REST requests. All together, beside deploying function, it:
- Adds environment variables defined in
config
directory - Logs progress with common tags
- Verifies if main package module is defined
- Saves
options
in environment variable (minus subset of variables from step 1) - Saves
responseOptions
in environment variable - Wraps function handler in order to provide API framework features.
Configure
Available fields are described in Serverless function.
In addition responseOptions
supplies options for response serialization (see listed arguments for jsonapi-serializer).
statusCode
defines status code for successful response. By default - 200.
myFunction
component: '@argodigital/sl-function'
inputs:
responseOptions:
statusCode: 201
attributes: ['firstName', 'lastName']
...