Backend developers take a portion or all of responsibility in deployment. Traditionally, we choose plaftform, set up version of language, install libraries, install web server and so on.

Day by day, developers often face problems about deployment, which even takes more time than coding. Serverless currently is helpful tools for developers because advantages like: low Cost, automation scale, ... coder no need to take care about operation system. For small project, we don't need a devops because all that base on serverless.



Image

On Premises, we have to pay for rent a whole machine althrough we just run a small application for some customers. Instead of, Software as a Service (SaaS) can provide the least possible cost which depends on concept (we pay what we use). Function app is an instance of SaaS.

First, we should install azure extension in vscode. We will get lots of features vscode supports to work on azure smoothly. Then, we create function in local via vscode

Image

VScode automatically initiate source code. The rest, we can write code immediately.

Image

We can test function locally by terminal via Azure Functions Core Tools

brew tap azure/functions brew install azure-functions-core-tools@4 npm i -g azure-functions-core-tools@4 --unsafe-perm true func start

After coder finish development locally, next step will be deployment. We login to azure portal and create a function app name func-testing-api

Image

After success, we can see the new created function in vscode. It's ready to deploy.

Image

Let's check on azure portal. we success to deploy on function app with function named api-get-name

Image

The url production of function is in details of function. We can access now.

Image

Image

Sooner or later, serverless will achiveve software market because of its convenience.

Steve Nguyen

© Steve CV. All rights reserved.
Design - TemplateFlip