Layer Integration Template
Building a new integration from scratch can get pretty complicated. A good starting point would is integration-template project, which has the necessary project structure and boilerplate code to get you started. It contains both Amazon AWS and Microsoft Azure cloud provider implementations.
The template implements a simple backend service which listens for all messages that are sent in the Layer application and fetches the sender full identity via API. This implementation is for demonstration purposes only.
Clone the project to you local machine
git clone email@example.com:layerhq/integration-template.git
Pick your cloud provider
azureby navigating into the folder.
From your cloud provider folder e.g.
cd aws/ deploy the integration
You will be prompted to login with your Layer Dashboard credentials, pick your organization, application and a webhook secret.
There is an additional prompt for fake service key
service_keyto demonstrate how to use configuration values as part of the deployment input.
Once the integration is successfully deployed you can access logs using Serverless CLI
serverless logs -f webhook -t
Send some messages from your Layer application and watch the logs roll in. You should be able to see sender identity object in the console.
Once you understand the basics of how this integration works, you can take the contents of cloud provider folder
azure and start experimenting on your own.
For more information read Serverless docs and start building your own integration.