JavaScript, Meet Cloud: Node.js on Windows Azure

33 %
67 %
Information about JavaScript, Meet Cloud: Node.js on Windows Azure

Published on February 26, 2014

Author: goldshtn



Slides from a talk at the North Toronto .NET User Group. An introduction to Node.js and Express followed by a tour of Windows Azure and various hosting options for Node applications, including Windows Azure Web Sites, Windows Azure Mobile Services, and Windows Azure Virtual Machines.

Sasha Goldshtein CTO, SELA Group @goldshtn JavaScript, Meet Cloud: Node.js on Windows Azure © Copyright SELA Software & Education Labs Ltd. | 14-18 Baruch Hirsch St Bnei Brak, 51202 Israel |

Node.js? Lightweight JavaScript server with a rich module ecosystem running on Azure as a web site or a service

The New Microsoft You can run a Node.js web service on an Ubuntu VM on Windows Azure that uses Redis for caching, MongoDB for sessions, and an SQL Database for most models. Oh, and you can integrate it with a Windows Store or iPhone app.

What is Node.js JavaScript on the server Uses the Google V8 engine High-speed JavaScript JIT and GC Hundreds of modules, vibrant ecosystem Package manager, including dependencies HTTP(S), TCP, UDP server and client Bindings and ORMs for virtually every DB MVC framework (express) Everything is open source

Why Node? Cross-platform It’s the next hip thing (after RoR) Asynchronous but no explicit concurrency Rapid development Tiny footprint

Hello, Node var http = require('http'); var server = http.createServer(function(req, res) { res.writeHead(200, {'Content-Type’: 'text/plain'}); res.end('Hello, Node!n'); }); server.listen(8080);

express var express = require('express'); var app = express.createServer(); app.get('/hello', function (req, res) { res.sendfile('hello.htm'); });'/echo', function (req, res) { res.end('You said: ' + req.body.message); }); app.listen(8080);

nstore var nstore = require('nstore'); var messages ='messages.db', ...);, msg, function (err) ...); messages.all(function (err, results) { ... }); messages.find({ user: 'Sasha' }, ...);

Node on Azure Web Sites Put your code in app.js or server.js Deploy using Git, Mercurial, TFS, FTP, WebDeploy, Dropbox Use modules freely with package.json Debug your website with node-inspectorNEW

msnodesql var sql = require('msnodesql'); sql.query(conn_str, 'SELECT * FROM Messages', function (err, results) { if (!err) ... } ); sql.queryRaw(conn_str, 'INSERT INTO Messages ...');

Node with SQL Database Create an SQL database Get a connection string Open the firewall (if testing from premises) Node away!

Shared DB with Mobile Services While we’re at it … Windows Azure Mobile Services makes implementing backends a breeze You can share a DB var table = MobileService.GetTable<Message>(); var messages = table.Where( m => m.User == "Sasha").ToList(); await table.InsertAsync(new Message(...));

Node with Table Storage Windows Azure Table Storage is a lightweight, super-cheap, NoSQL data store Rows have dynamic properties Single primary key (index) var q ='messages'); tableService.queryEntities( q, function (err, results) ...); tableService.insertEntity('messages', newMsg, ...);

Node on Azure Virtual Machines Install whatever you want Pick from Windows or Linux distros Microsoft open VMDepot offers dozens of images We’ll use MongoDB on Ubuntu And Mongoose for an ORM var db = mongoose.createConnection(...); var Message = db.model('Message', schema); Message.find(function (err, results) ...);

Node Editor in The Cloud Visual Studio Online “Monaco”NEW is a cloud IDE for your Node/ASP.NET Azure web sites

Questions Sasha Goldshtein CTO, SELA Group @goldshtn

Add a comment

Related presentations

Presentación que realice en el Evento Nacional de Gobierno Abierto, realizado los ...

In this presentation we will describe our experience developing with a highly dyna...

Presentation to the LITA Forum 7th November 2014 Albuquerque, NM

Un recorrido por los cambios que nos generará el wearabletech en el futuro

Um paralelo entre as novidades & mercado em Wearable Computing e Tecnologias Assis...

Microsoft finally joins the smartwatch and fitness tracker game by introducing the...

Related pages

JavaScript, Meet Cloud: Node.js on Windows Azure | Windows ...

What does this mean? Following an item on Channel 9 allows you to watch for new content and comments that you are interested in and view them all on your ...
Read more

JavaScript, Meet Cloud: Node.js on Windows Azure -- Visual ...

Learn to build a Node.js application from scratch and deploy it to Windows Azure in a matter of seconds.
Read more

Node.JS developer center | Microsoft Azure

What is Azure Learn the basics about Microsoft's cloud ... to virtually all devices with the scale to meet your ... Windows Azure SDK for Node.js.
Read more

My Session on JavaScript, Meet Cloud : Node.js on Windows ...

Sunday, November 17, 2013. Azure Community News Mobile Services Node.js Windows Azure. I did a presentation titled “JavaScript, Meet Cloud: Node.js on ...
Read more

Build and deploy a Node.js application to an Azure Cloud ...

Learn how to create a simple Node.js web ... Node.js application running in an Azure Cloud ... window will open and navigate to the cloud ...
Read more

JavaScript, Meet Cloud: Node.js on Windows Azure -- Visual ...

In this talk we'll build a Node.js application from scratch and deploy it to Windows Azure in a matter of seconds.
Read more

KeralaJS | November meetup - KeralaJS | Kerala JavaScript ...

... Meet Cloud : Node.js on Windows Azure. ... KeralaJS meetup ... JavaScript at QBurst 10:15 JavaScript, Meet Cloud: Node.js on Windows Azure, by ...
Read more

Using Windows Azure and Node.js -

Using Windows Azure and Node.js. Node.js allows you to leverage the JavaScript runtime engine on the server ... Private Cloud Trial; Windows Azure SDK for ...
Read more