- Lab
-
Libraries: If you want this lab, consider one of these libraries.
- Cloud

Work with the Azure Functions CLI
In this lab you'll learn how to use the Azure Functions Command line tools, by calling them from within a cloud shell in the Azure portal. - First, you'll create a new Azure Functions project with the `func init` command. - Then you'' use the `func new` command to add a function - You can then use the `code` command to take a look at the files - And you can see how the `func host start` command can be used to build and run a function app, although it won't be functional if you're using the cloud shell, as this command is intended for local development scenarios and requires the Azurite storage emulator

Lab Info
Table of Contents
-
Challenge
Create a new functions app
- Create an empty folder e.g. called azurefuncs
- Navigate into that folder
- Run the
func init
command in that folder - Create a dotnet isolated function app (or choose another runtime if you prefer)
-
Challenge
Add a function to your function app
- In the same folder, run the
func new
command in the Azure cloud shell - Select to create a HTTP triggered function
- You can chose whatever name you prefer
- In the same folder, run the
-
Challenge
Explore the generated code
- Use the
code
command in the Azure Cloud Shell to explore the code generated by the previous two commands
- Use the
-
Challenge
Start the function app runtime
- In the Azure Cloud shell, run the
func host start
command to build the code and start the functions host - Note: because this tooling is intended for local development it will fail to run the function app. If you prefer, you can install the Azure Functions Core tools and Azurite emulator locally on your own machine to see this step fully running
- In the Azure Cloud shell, run the
About the author
Real skill practice before real-world application
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Learn by doing
Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.
Follow your guide
All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.
Turn time into mastery
On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.