Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

nodejs function app demonstrating blob trigger and using Azurite for offline testing

Notifications You must be signed in to change notification settings

mydiemho/blob-trigger-sample

Repository files navigation

Overview

instruction to reproduce error connecting to Azurite on v3

Azurite V2 working

Note Azurite is installed as a dev dependency

  1. Shell 1
npm i
npm run azurite:v2  # start azurite
  1. Shell 2
npm i -g serverless
sls offline
  1. Shell 3
./run.sh   # upload file to local blob
  1. Monitor Shell 2 for output
[9/3/19 8:23:42 PM] Executing 'Functions.storageBlob' (Reason='New blob detected: blob-sample/sample-2019-09-03.json', Id=a5859f8b-b807-4fa7-a70b-31a116450ed2)
[9/3/19 8:21:54 PM] ================= MESSAGE START =================
[9/3/19 8:21:54 PM] Blob name:  sample-2019-09-03.json
[9/3/19 8:21:54 PM] Blob length:  26  bytes
[9/3/19 8:21:54 PM] Blob content: {
[9/3/19 8:21:54 PM]   "data": "I'm a blob"
[9/3/19 8:21:54 PM] }
[9/3/19 8:21:54 PM] ================= MESSAGE END ================

Azurite V3

  1. Update azurite to v3 in package.json
npm i -s azurite@latest
  1. Shell 1
npm i
npm run azurite:v3  # start azurite
  1. Shell 2
npm i -g serverless
sls offline
  1. Shell 3
./run.sh   # upload file to local blob
  1. Monitor Shell 2 for error
[8/16/19 5:33:20 PM] An unhandled exception has occurred. Host is shutting down.
[8/16/19 5:33:20 PM] Microsoft.WindowsAzure.Storage: Connection refused. System.Net.Http: Connection refused. System.Private.CoreLib: Connection refused.

About

nodejs function app demonstrating blob trigger and using Azurite for offline testing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published