项目作者: simonaco

项目描述 :
Serverless API endpoint running on Azure Functions
高级语言: JavaScript
项目地址: git://github.com/simonaco/nodebinar.git
创建时间: 2018-12-03T14:14:20Z
项目社区:https://github.com/simonaco/nodebinar

开源协议:

下载


nodebinar Build Status

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.

Deploy resources

Deploy to Azure

Prerequisites

  1. A recent version of Node (8+)

  2. VS Code: here

  3. Azure Functions CLI: here

  4. Azure Functions Extension for VS Code: here

  5. Azure account: https://aka.ms/free

Run locally

  1. Install all dependencies by running npm i

  2. 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.

  3. In local.settings.json, setup your environment variables for connecting to your database:

  1. {
  2. "IsEncrypted": false,
  3. "Values": {
  4. "AzureWebJobsStorage": "",
  5. "FUNCTIONS_WORKER_RUNTIME": "node",
  6. "user": "your-db-user",
  7. "password": "your-db-password",
  8. "port": "your-db-port"
  9. }
  10. }
  1. 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