Skip to content

Azure Storage POC demo

Lakindu Gunasekara edited this page Jul 2, 2018 · 4 revisions

Setup

  • Install [https://code.visualstudio.com/download](VS Code) or any of your favorite editors.
  • Git clone https://github.com/cloudlibz/clocal-azure.git (since no npm module published yet)
  • Go to the root and install modules (npm install / yarn install)

Commands

To run the azure storage,

clocal storage start

This will start running docker image of "Azurite" from azure for local emulation. https://github.com/Azure/Azurite

Since the Azurite is running on docker, the docker commands are executed via Dockerode To define the properties of the docker image,

var Docker = require('dockerode');

var docker = new Docker({socketPath: '/var/run/docker.sock'});

var docker1 = new Docker(); //defaults to above if env variables are not used

var docker2 = new Docker({host: 'http://192.168.1.10', port: 3000});

var docker3 = new Docker({protocol:'http', host: '127.0.0.1', port: 3000});

var docker4 = new Docker({host: '127.0.0.1', port: 3000}); //defaults to http