Hello World with Azure Functions
A quick and simple hello world of Azure Functions.
There is some amount of setting up to do. Obviously, you need to have dot net and dot net SDK installed. I have tested this code with both VS Code and Visual Studio.
and install the tools.
And the extension.
Finally, I noticed this little issue. For some reason, the tool isn’t available in VS Code. But it was available in the command line. So, I had to resort to running the code from the command line. Or, in Visual Studio.
Also, here are some pointers.
- I was unabled to ‘func start’ from within the terminal though.
- I had to run by opening a command line directly from the project folder
- I had to run, by opening the project in visual studio.
- also, look at this error, which I ran into, https://stackoverflow.com/questions/77955051/error-cs1061-hostbuilder-does-not-contain-a-definition-for-configurefunction
Finally, I was able to access the endpoint from the browser.
You can find the full code, here.
Ultimately, I did this little bit of code as I was preparing for my upcoming AZ 900 exam. There was a short little chapter about Azure Functions, I decided to build this hello world project. It does not do anything, but, it still shows the capabiity of Azure Functions.
As time goes, I plan to update this (or add more Azure Functions code). I think, this whole serverless thing, if explored more, could have plenty of potential.
That’s all for now.
I work as a coding tutor. You can hire me on Upwork, Fiverr and Codementor. You can also book a session on calendly, and visit my website. Also, video tutorials on my YouTube Channel. My Podcast is here.