If you want to learn more about getting started with serverless using VS Code and watch a demo of Azure API Management you can register here and you'll get a recorded version of the webinar.
-
A recent version of Node (8+)
-
VS Code: here
-
Azure Functions CLI: here
-
Azure Functions Extension for VS Code: here
-
Azure account: https://aka.ms/free
-
Install all dependencies by running
npm i
-
In VS Code, go to the Azure Functions extension and click on
Create New Project...
icon. This will create a local.settings.json file for us and configure local debugging. -
In
local.settings.json
, setup your environment variables for connecting to your database:
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "",
"FUNCTIONS_WORKER_RUNTIME": "node",
"user": "your-db-user",
"password": "your-db-password",
"port": "your-db-port"
}
}
- In VS Code, go to the Debugging panel and run application by cliking on the
Start debugging
icon (small play button on the left hand side of the top bar)
Congrats!! You made it - built your very first endpoint on Serverless!
Bonus: If interested to learn more about serverless make sure to checkout the free self guided courses on Microsoft Learn Serverless Path