Earl Gay b33611cad9
Fix broken Azure example
The example has several errors, including incorrect Provider Plugin name and incorrect invocation command.
2018-04-07 02:22:48 -04:00
..
2017-02-20 02:10:20 -08:00
2018-04-07 02:22:48 -04:00
2017-02-20 02:10:41 -08:00

Read this on the main serverless docs site

Hello World Node.js Example

Make sure serverless is installed. See installation guide.

1. Create a service

serverless install --url https://github.com/azure/boilerplate-azurefunctions --name my-sls-app

2. Install Provider Plugin

npm install -g serverless-azure-functions followed by npm install in the service directory.

3. Deploy

serverless deploy or sls deploy. sls is shorthand for the Serverless CLI command

4. Invoke deployed function

serverless invoke --function httpjs --path httpQueryString.json or serverless invoke -f httpjs --path httpQueryString.json

-f is shorthand for --function

In your terminal window you should see the response from azure

{
    "payload": "Hello pragna"
}

Congrats you have deployed and ran your Hello World function!