mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
1.4 KiB
1.4 KiB
Read this on the main serverless docs site
Azure - Functions
If you are using Azure Functions as a provider, all functions inside the service are Azure Functions.
Configuration
All of the Azure Functions in your serverless service can be found in serverless.yml under the functions property.
# serverless.yml
service: azfx-node-http
provider:
name: azure
location: West US
plugins:
- serverless-azure-functions
functions:
hello:
handler: templates/handler.hello
events:
- http: true
x-azure-settings:
authLevel : anonymous
The handler property points to the file (default filename: handler.js) and module containing the code you want to run in your function.
// handler.js
exports.handler = function(params) {}
You can add as many functions as you want within this property.
# serverless.yml
...
functions:
functionOne:
handler: handler.functionOne
description: optional description for your Function
functionTwo:
handler: handler.functionTwo
functionThree:
handler: handler.functionThree