https://github.com/jeffhollan/functions-nodejs-hello
https://github.com/jeffhollan/functions-nodejs-hello
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jeffhollan/functions-nodejs-hello
- Owner: jeffhollan
- Created: 2020-03-20T16:15:55.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-01-05T22:31:14.000Z (almost 5 years ago)
- Last Synced: 2025-08-31T18:05:15.830Z (about 2 months ago)
- Language: Shell
- Homepage:
- Size: 191 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
If you wanted to deploy this today NOT using porter, you would do the following:
## Using the Azure CLI
```bash
# Create function app
az group create -n $resourceGroup -l westus2
az storage account create -g $resourceGroup -n $uniqueStorageName --sku Standard_LRS
az functionapp create -g $resourceGroup -n $uniqueAppName --os-type linux --runtime node --runtime-version 12 --functions-version 3 -s $uniqueStorageName --consumption-plan-location westus2
# Zip and deploy app
zip -rX app.zip .
az functionapp deployment source config-zip -g $resourceGroup -n $uniqueAppName --src ./app.zip --build-remote
```
## Using the Func CLI
```bash
#Create function app
az group create -n $resourceGroup -l westus2
az storage account create -g $resourceGroup -n $uniqueStorageName --sku Standard_LRS
az functionapp create -g $resourceGroup -n $uniqueAppName --os-type linux --runtime node --runtime-version 12 --functions-version 3 -s $uniqueStorageName --consumption-plan-location westus2
# Deploy
func azure functionapp publish $uniqueAppName
```
Once it's deployed you should be able to get the current weather with
```bash
curl https://$uniqueAppName.azurewebsites.net/api/HttpTrigger
```