Azure - Workflow
Intro. Quick recommendations and tips for various processes.
Development Workflow
- Write your functions
- Run function app locally by using
sls offline
andnpm start
(orfunc host start
). See quickstart. - Use
serverless deploy
to deploy your function app (preferably in a CI/CD environment) - Use
serverless invoke -f myFunction
to test your Azure Functions.
Larger Projects
- Break your application/project into multiple Function Apps.
- Model your Function Apps around Data Models or Workflows.
- Keep the Functions and Resources in your Function Apps to a minimum.
Cheat Sheet
A handy list of commands to use when developing with the Serverless Framework.
Create A Function App:
Install the boilerplate application:
- with node:
sls create -t azure-nodejs -p my-app
- with python:
sls create -t azure-python -p my-app
Install A Service
This is a convenience method to install a pre-made Serverless Service locally by downloading the GitHub repo and unzipping it.
serverless install -u [GITHUB URL OF SERVICE]
Deploy
Use this when you have made changes to your Function App
sls deploy
Invoke Function
Invokes an Azure Function
sls invoke function -f [FUNCTION NAME]