DEV Community

Cover image for Azure Functions - Creating a new function
Flavio Campelo
Flavio Campelo

Posted on

3 1

Azure Functions - Creating a new function

📮 Contact 🇧🇷 🇺🇸 🇫🇷

Twitter
LinkedIn


Creating a Function App

Once you're connected on Azure Portal, you can create a new Function App.

I recommend to user Consumption plan for your new function because it's included on Microsoft's limited free services.

Using Visual Studio Code

Installing extensions on Visual Studio Code

It's recommended to install Azure Tools on your VS Code that will connect with your Azure account to make easy to interact with Azure Cloud Services

Image 1

INFO
You could install Azure Functions Core Tools

Creating a local function

So you can click on create a new function and choose some information for your new function.

Image 4

For our test we've choosen the following values:

  • Language C#
  • .NET runtime .NET 6
  • Template HTTP trigger
  • Name you can choose the name that you want
  • Namespace you can choose the namespace that you want
  • Aythorization level Anonymous
  • How do you like to open your project Add to workspace

Using Visual Studio

Creating a local function

Click on File > New > Project

Image 2

And search for Azure Functions

Image 3

Fill out all required information for your new function. For our example we'll use HTTP trigger and Anonymous authorization.

INFO
You can find more information about function triggers here and information about Authorization here.

Running the function

Now you are able to run your new function. You can hit F5 for that and you'll see some message like that

Image 5

You can open your browser and navigate to this endpoint

http://localhost:7071/api/Function1?name=Flavio
Enter fullscreen mode Exit fullscreen mode

Image 6

Source

Typos or suggestions?

If you've found a typo, a sentence that could be improved or anything else that should be updated on this blog post, you can access it through a git repository and make a pull request. If you feel comfortable with github, instead of posting a comment, please go directly to https://github.com/campelo/documentation and open a new pull request with your changes.

Image of Stellar post

How a Hackathon Win Led to My Startup Getting Funded

In this episode, you'll see:

  • The hackathon wins that sparked the journey.
  • The moment José and Joseph decided to go all-in.
  • Building a working prototype on Stellar.
  • Using the PassKeys feature of Soroban.
  • Getting funded via the Stellar Community Fund.

Watch the video

Top comments (0)

AWS Security LIVE! Stream

Stream AWS Security LIVE!

See how AWS is redefining security by design with simple, seamless solutions on Security LIVE!

Learn More

👋 Kindness is contagious

Engage with a wealth of insights in this thoughtful article, valued within the supportive DEV Community. Coders of every background are welcome to join in and add to our collective wisdom.

A sincere "thank you" often brightens someone’s day. Share your gratitude in the comments below!

On DEV, the act of sharing knowledge eases our journey and fortifies our community ties. Found value in this? A quick thank you to the author can make a significant impact.

Okay