Skip to content

Instantly share code, notes, and snippets.

@mcnkbr
Last active November 14, 2021 22:27
Show Gist options
  • Save mcnkbr/486a0d6578e8eb1af1381cd3710f8f4e to your computer and use it in GitHub Desktop.
Save mcnkbr/486a0d6578e8eb1af1381cd3710f8f4e to your computer and use it in GitHub Desktop.
npm install -g serverless
service: hello-world
frameworkVersion: '2'
provider:
name: azure # Serverless sağlayıcı adı
region: West US 2 # Uygulamanın dağıtılacağı lokasyon
runtime: nodejs12 # Nodejs versiyonu
environment:
VARIABLE_HELLO: 'hello' # Uygulama içinde kullanabileceğiniz global değişkenler
plugins:
- serverless-azure-functions
package:
patterns:
- '!local.settings.json'
- '!.vscode/**'
functions:
hello: # Oluşturulan function için tanımlama
handler: src/handlers/hello.sayHello # Gelen isteği karşılayacak function
events:
- http: true
methods:
- GET # HTTP istek türü GET,POST,PUT,DELETE
authLevel: anonymous # Yapılacak isteklere belirli bir role atama
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment