Getting the samples to work on the Azure Node.js SDK

(You probably want to do this in linux)

Install Node.js & NPM

echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install
curl http://npmjs.org/install.sh | sh

Download the SDK

npm install azure

Download the dependencies

cd azure-sdk-for-node
npm install 
cd examples/blog
npm install
cd ../tasklist
npm install
cd ../../

Update the storage credentials

Update the ./lib/services/serviceclient.js with your credentials.

The examples use the dev storage, so just update the dev storage details to be the live endpoint URIs, and your account and access key.

Run the examples

Start node with either of the following commands:

cd examples/blog
node server

or

cd examples/tasklist
node server

Then browse to http://localhost:1337/ to try the applications.

Advertisements