SlideShare a Scribd company logo
1 of 45
Download to read offline
Building APIs with NodeJS on Microsoft 
Azure Websites 
Rick G. Garibay 
VP, Distinguished Engineer 
Level: Intermediate
About Me 
• VP, Distinguished Engineer leading the Development 
Platform Group at Neudesic 
• Working on IoT, Intelligent Transportation and Hospitality 
& Gaming 
• Microsoft MVP, Microsoft Azure 
• Co-Author, “Windows Server AppFabric Cookbook” by 
Packt Pub. 
• Chairman, Co-Founder Phoenix Connected Systems User 
Group (PCSUG.org) 
• twitter: @rickggaribay 
• blog: http://rickgaribay.net 
• email: rick.garibay@neudesic.com | b-rigari@microsoft.com
The problem with long URLs…
http://mysadsharepointsite/not/rest/ful/Foo.aspx? 
RootFolder=%2Fpractice%2FConnected%5FSystem 
s%2FDocuments%2F5%2E%20Training%20Resourc 
es&FolderCTID=0x0120006C1E110A70E85644A26E 
2C21A71B0D82&View={8F82FE4D-9398-4892- 
B6E6-C2D9C2AB2BE8}
A terrible user experience at best.
But worse, a missed opportunity…
Every URL you send a customer, partner, 
prospect is an opportunity to make a 
branding impression.
http://mysadsharepointsite/not/rest/ful/Foo.aspx? 
RootFolder=%2Fpractice%2FConnected%5FSystem 
s%2FDocuments%2F5%2E%20Training%20Resourc 
es&FolderCTID=0x0120006C1E110A70E85644A26E 
2C21A71B0D82&View={8F82FE4D-9398-4892- 
B6E6-C2D9C2AB2BE8}
http://neurl.it/pewUGm
Marketing Campaigns 
Advertisements 
Promotions 
Internal Communication 
A/B Testing
neurl.it v0.1 
• Shorten/Create 
– When I submit a long, ugly URL to the create API, I 
should get back a neurl. 
• Redirect 
– When I submit a neurl to the submit API, my 
request should be automatically redirected. 
• Hits 
– When I submit a neurl to the hits API, I should get 
back the number of hits/redirects for that neurl.
http://mysadsharepointsite/not/rest/ful/Foo.aspx? 
RootFolder=%2Fpractice%2FConnected%5FSystem 
s%2FDocuments%2F5%2E%20Training%20Resourc 
es&FolderCTID=0x0120006C1E110A70E85644A26E 
2C21A71B0D82&View={8F82FE4D-9398-4892- 
B6E6-C2D9C2AB2BE8}
POST http://neurl.it/create HTTP/1.1 
User-Agent: Fiddler 
Host: neurl.it 
Content-Type: application/json; charset=utf-8 
Content-Length: 36 
{"Url" : "http://rickgaribay.net"} 
HTTP/1.1 200 OK 
X-Powered-By: Express 
Content-Type: application/json; charset=utf-8 
Content-Length: 57 
Date: Fri, 08 Mar 2013 05:00:21 GMT 
Connection: keep-alive 
{ 
"http://neurl.it/pewUGm" 
}
What is NodeJS? 
• Server-side scripting framework based on the 
Google V8 engine accessible via JavaScript. 
• Asynchronous by nature, making it very 
performant. 
• Growing community and industry support, 
including libraries (modules).
Hello Node 
// Say Hello via Console 
console.log("Hello World");
Hello Node 
// Load the http module to create an http server. 
var http = require('http'); 
// Configure our HTTP server to respond with Hello World to all 
requests. 
var server = http.createServer(function (request, response) { 
response.writeHead(200, {"Content-Type": "text/plain"}); 
response.end("Hello Worldn"); 
}); 
// Listen on port 8000 
server.listen(8000); 
// Put a friendly message on the terminal 
console.log("Server running at http://127.0.0.1:8000/");
NodeJS Fundamentals 
• Node Package Manager (NPM) – Package manager 
for downloading and referencing thousands of 
NodeJS modules. 
• Package.json – Captures information about 
modules (including your project/module) and 
dependencies. 
• Server.js – Typical entry point to a NodeJS 
application but any .js will do. 
• Running NodeJS apps is as simple as this: 
> node server.js
Client 
Event Loop 
Callback 
Workers 
IO 
Response
Why Node? 
• My goal is not to convince you to use NodeJS 
over ASP.NET, Web API, WCF or any other 
back-end framework.
Why Node? 
• Rather, I want to show you a practical example 
of what you can do with NodeJS. 
• Alternate implementations, either in NodeJS 
or other platforms, frameworks and languages 
is left as an exercise to the reader.
Implementing the Create API 
SHOW ME TEH CODEZ
GET http://neurl.it/pewUGm HTTP/1.1 
User-Agent: Fiddler 
Host: neurl.it 
Content-Type: application/json; charset=utf-8 
Content-Length: 0 
HTTP/1.1 302 Moved Temporarily 
X-Powered-By: Express 
Location: http://rickgaribay.net 
Vary: Accept 
Content-Type: text/plain 
Content-Length: 56 
Date: Fri, 08 Mar 2013 05:16:45 GMT 
Connection: keep-alive 
Moved Temporarily. Redirecting to http://rickgaribay.net
Implementing the Redirect API 
SHOW ME TEH CODEZ
GET http://neurl.it/pewUGm/hits HTTP/1.1 
User-Agent: Fiddler 
Host: neurl.it 
Content-Type: application/json; charset=utf-8 
Content-Length: 0 
HTTP/1.1 200 OK 
X-Powered-By: Express 
Content-Type: text/html; charset=utf-8 
Content-Length: 2 
Date: Fri, 08 Mar 2013 05:21:37 GMT 
Connection: keep-alive 
42
Implementing the Hits API 
SHOW ME TEH CODEZ
Supported Publishing Methods
Supported Web Frameworks
Diagnostics & Monitoring
10 free sites. Multi-tenant. Daily quotas 
100 free sites. Multi-tenant. Daily quotas 
Unlimited. Dedicated VMs. No quotas 
Unlimited. Dedicated VMs. + more
shared 1
shared 2
Deploy Neurl.it to Azure with Git & Scale 
DEMO
Windows Azure Web Sites
Start Simple 
Get started with 10 free web sites 
Create new sites in seconds 
Easily manage and scale your sites 
Automatic load balancing and shared 
storage across instances 
Scale out or up to reserved instances for 
improved performance and scale
Code Smart 
Use ASP.NET, ASP, PHP, or NodeJS 
SQL Azure or MySQL databases 
Start with open source apps and frameworks 
Develop with VS and WebMatrix 
Supports any Web development tool on any 
platform (Windows, OSX, Linux)
Go Live 
Rapid deployment for quick iteration 
Integrated source control with Team 
Foundation Server (TFS) and Git 
Built-in monitoring of perf and usage data 
Quick access to request logs, failed requests 
diagnostics and diagnostics
Resources 
• Building Hypermedia APIs with HTML5 and Node by Mike 
Amudsen 
• Express http://expressjs.com/ 
• Mocha http://visionmedia.github.com/mocha/ 
• Should https://github.com/lukebayes/node-should 
• SuperTest https://github.com/visionmedia/supertest 
• MongoDb http://www.mongodb.org/ 
• Mongoose https://github.com/LearnBoost/mongoose 
• Fiddler http://www.fiddler2.com/fiddler2/ 
• Microsoft Azure: http://Azure.com 
• Configuring Domain Names on Azure Websites 
http://bit.ly/1pvOclY 
Azure CLI http://azure.microsoft.com/en-us/ 
documentation/articles/xplat-cli/
About Me 
• VP, Distinguished Engineer leading the Development 
Platform Group at Neudesic 
• Working on IoT, Intelligent Transportation and Hospitality 
& Gaming 
• Microsoft MVP, Microsoft Azure 
• Co-Author, “Windows Server AppFabric Cookbook” by 
Packt Pub. 
• Chairman, Co-Founder Phoenix Connected Systems User 
Group (PCSUG.org) 
• twitter: @rickggaribay 
• blog: http://rickgaribay.net 
• email: rick.garibay@neudesic.com | b-rigari@microsoft.com

More Related Content

What's hot

In-browser storage and me
In-browser storage and meIn-browser storage and me
In-browser storage and meJason Casden
 
Develop for Azure storage
Develop for Azure storageDevelop for Azure storage
Develop for Azure storageAzureEzy1
 
The State of WebSockets in Django
The State of WebSockets in DjangoThe State of WebSockets in Django
The State of WebSockets in DjangoRami Sayar
 
What is NetDevOps? How? Leslie Carr PuppetConf 2015
What is NetDevOps? How? Leslie Carr PuppetConf 2015What is NetDevOps? How? Leslie Carr PuppetConf 2015
What is NetDevOps? How? Leslie Carr PuppetConf 2015Leslie Carr
 
Appsec DC - wXf -2010
Appsec DC - wXf  -2010Appsec DC - wXf  -2010
Appsec DC - wXf -2010Chris Gates
 
Fastly CEO Artur Bergman at Altitude NYC
Fastly CEO Artur Bergman at Altitude NYCFastly CEO Artur Bergman at Altitude NYC
Fastly CEO Artur Bergman at Altitude NYCFastly
 
Adventures with Podman and Varlink
Adventures with Podman and VarlinkAdventures with Podman and Varlink
Adventures with Podman and VarlinkJeremy Brown
 
Zero To Cloud (OSCon 2014)
Zero To Cloud (OSCon 2014)Zero To Cloud (OSCon 2014)
Zero To Cloud (OSCon 2014)Justin Ryan
 
CodeIgniter For Project : Lesson 103 - Introduction to Codeigniter
CodeIgniter For Project : Lesson 103 - Introduction to CodeigniterCodeIgniter For Project : Lesson 103 - Introduction to Codeigniter
CodeIgniter For Project : Lesson 103 - Introduction to CodeigniterWeerayut Hongsa
 
Powering Microservices with Docker, Kubernetes, Kafka, and MongoDB
Powering Microservices with Docker, Kubernetes, Kafka, and MongoDBPowering Microservices with Docker, Kubernetes, Kafka, and MongoDB
Powering Microservices with Docker, Kubernetes, Kafka, and MongoDBMongoDB
 
Web frameworks don't matter
Web frameworks don't matterWeb frameworks don't matter
Web frameworks don't matterTomas Doran
 
Docker With Asp.net Core
Docker With Asp.net CoreDocker With Asp.net Core
Docker With Asp.net CoreFatih Şimşek
 
DevSecCon Singapore 2019: Workshop - Burp extension writing workshop
DevSecCon Singapore 2019: Workshop - Burp extension writing workshopDevSecCon Singapore 2019: Workshop - Burp extension writing workshop
DevSecCon Singapore 2019: Workshop - Burp extension writing workshopDevSecCon
 
Creating RESTful API’s with Grails and Spring Security
Creating RESTful API’s with Grails and Spring SecurityCreating RESTful API’s with Grails and Spring Security
Creating RESTful API’s with Grails and Spring SecurityAlvaro Sanchez-Mariscal
 
Continuous Delivery and Infrastructure as Code
Continuous Delivery and Infrastructure as CodeContinuous Delivery and Infrastructure as Code
Continuous Delivery and Infrastructure as CodeSascha Möllering
 
Network Automation - Interconnection tools
Network Automation - Interconnection toolsNetwork Automation - Interconnection tools
Network Automation - Interconnection toolsAndy Davidson
 
Deploying Plack Web Applications: OSCON 2011
Deploying Plack Web Applications: OSCON 2011Deploying Plack Web Applications: OSCON 2011
Deploying Plack Web Applications: OSCON 2011Tatsuhiko Miyagawa
 
Altitude SF 2017: Fastly GSLB: Scaling your microservice and multi-cloud envi...
Altitude SF 2017: Fastly GSLB: Scaling your microservice and multi-cloud envi...Altitude SF 2017: Fastly GSLB: Scaling your microservice and multi-cloud envi...
Altitude SF 2017: Fastly GSLB: Scaling your microservice and multi-cloud envi...Fastly
 
Offline first, the painless way
Offline first, the painless wayOffline first, the painless way
Offline first, the painless wayMarcel Kalveram
 
Rails security: above and beyond the defaults
Rails security: above and beyond the defaultsRails security: above and beyond the defaults
Rails security: above and beyond the defaultsMatias Korhonen
 

What's hot (20)

In-browser storage and me
In-browser storage and meIn-browser storage and me
In-browser storage and me
 
Develop for Azure storage
Develop for Azure storageDevelop for Azure storage
Develop for Azure storage
 
The State of WebSockets in Django
The State of WebSockets in DjangoThe State of WebSockets in Django
The State of WebSockets in Django
 
What is NetDevOps? How? Leslie Carr PuppetConf 2015
What is NetDevOps? How? Leslie Carr PuppetConf 2015What is NetDevOps? How? Leslie Carr PuppetConf 2015
What is NetDevOps? How? Leslie Carr PuppetConf 2015
 
Appsec DC - wXf -2010
Appsec DC - wXf  -2010Appsec DC - wXf  -2010
Appsec DC - wXf -2010
 
Fastly CEO Artur Bergman at Altitude NYC
Fastly CEO Artur Bergman at Altitude NYCFastly CEO Artur Bergman at Altitude NYC
Fastly CEO Artur Bergman at Altitude NYC
 
Adventures with Podman and Varlink
Adventures with Podman and VarlinkAdventures with Podman and Varlink
Adventures with Podman and Varlink
 
Zero To Cloud (OSCon 2014)
Zero To Cloud (OSCon 2014)Zero To Cloud (OSCon 2014)
Zero To Cloud (OSCon 2014)
 
CodeIgniter For Project : Lesson 103 - Introduction to Codeigniter
CodeIgniter For Project : Lesson 103 - Introduction to CodeigniterCodeIgniter For Project : Lesson 103 - Introduction to Codeigniter
CodeIgniter For Project : Lesson 103 - Introduction to Codeigniter
 
Powering Microservices with Docker, Kubernetes, Kafka, and MongoDB
Powering Microservices with Docker, Kubernetes, Kafka, and MongoDBPowering Microservices with Docker, Kubernetes, Kafka, and MongoDB
Powering Microservices with Docker, Kubernetes, Kafka, and MongoDB
 
Web frameworks don't matter
Web frameworks don't matterWeb frameworks don't matter
Web frameworks don't matter
 
Docker With Asp.net Core
Docker With Asp.net CoreDocker With Asp.net Core
Docker With Asp.net Core
 
DevSecCon Singapore 2019: Workshop - Burp extension writing workshop
DevSecCon Singapore 2019: Workshop - Burp extension writing workshopDevSecCon Singapore 2019: Workshop - Burp extension writing workshop
DevSecCon Singapore 2019: Workshop - Burp extension writing workshop
 
Creating RESTful API’s with Grails and Spring Security
Creating RESTful API’s with Grails and Spring SecurityCreating RESTful API’s with Grails and Spring Security
Creating RESTful API’s with Grails and Spring Security
 
Continuous Delivery and Infrastructure as Code
Continuous Delivery and Infrastructure as CodeContinuous Delivery and Infrastructure as Code
Continuous Delivery and Infrastructure as Code
 
Network Automation - Interconnection tools
Network Automation - Interconnection toolsNetwork Automation - Interconnection tools
Network Automation - Interconnection tools
 
Deploying Plack Web Applications: OSCON 2011
Deploying Plack Web Applications: OSCON 2011Deploying Plack Web Applications: OSCON 2011
Deploying Plack Web Applications: OSCON 2011
 
Altitude SF 2017: Fastly GSLB: Scaling your microservice and multi-cloud envi...
Altitude SF 2017: Fastly GSLB: Scaling your microservice and multi-cloud envi...Altitude SF 2017: Fastly GSLB: Scaling your microservice and multi-cloud envi...
Altitude SF 2017: Fastly GSLB: Scaling your microservice and multi-cloud envi...
 
Offline first, the painless way
Offline first, the painless wayOffline first, the painless way
Offline first, the painless way
 
Rails security: above and beyond the defaults
Rails security: above and beyond the defaultsRails security: above and beyond the defaults
Rails security: above and beyond the defaults
 

Viewers also liked

WSO2 Integration Platform - The most comprehensive integration platform for y...
WSO2 Integration Platform - The most comprehensive integration platform for y...WSO2 Integration Platform - The most comprehensive integration platform for y...
WSO2 Integration Platform - The most comprehensive integration platform for y...WSO2
 
WSO2 Integration Platform: Vision and Roadmap
WSO2 Integration Platform: Vision and RoadmapWSO2 Integration Platform: Vision and Roadmap
WSO2 Integration Platform: Vision and RoadmapWSO2
 
Hybrid Cloud Integration is Coming: Are You Ready? | MuleSoft
Hybrid Cloud Integration is Coming: Are You Ready? | MuleSoftHybrid Cloud Integration is Coming: Are You Ready? | MuleSoft
Hybrid Cloud Integration is Coming: Are You Ready? | MuleSoftMuleSoft
 
The Emerging Integration Reference Architecture | MuleSoft
The Emerging Integration Reference Architecture | MuleSoftThe Emerging Integration Reference Architecture | MuleSoft
The Emerging Integration Reference Architecture | MuleSoftMuleSoft
 
Microservices and the Cloud based future of integration final
Microservices and the Cloud based future of integration finalMicroservices and the Cloud based future of integration final
Microservices and the Cloud based future of integration finalBizTalk360
 
Chris O'Brien - Modern SharePoint sites and the SharePoint Framework - reference
Chris O'Brien - Modern SharePoint sites and the SharePoint Framework - referenceChris O'Brien - Modern SharePoint sites and the SharePoint Framework - reference
Chris O'Brien - Modern SharePoint sites and the SharePoint Framework - referenceChris O'Brien
 
How to Use Hybrid Integration Platforms Effectively
How to Use Hybrid Integration Platforms EffectivelyHow to Use Hybrid Integration Platforms Effectively
How to Use Hybrid Integration Platforms EffectivelyMuleSoft
 

Viewers also liked (7)

WSO2 Integration Platform - The most comprehensive integration platform for y...
WSO2 Integration Platform - The most comprehensive integration platform for y...WSO2 Integration Platform - The most comprehensive integration platform for y...
WSO2 Integration Platform - The most comprehensive integration platform for y...
 
WSO2 Integration Platform: Vision and Roadmap
WSO2 Integration Platform: Vision and RoadmapWSO2 Integration Platform: Vision and Roadmap
WSO2 Integration Platform: Vision and Roadmap
 
Hybrid Cloud Integration is Coming: Are You Ready? | MuleSoft
Hybrid Cloud Integration is Coming: Are You Ready? | MuleSoftHybrid Cloud Integration is Coming: Are You Ready? | MuleSoft
Hybrid Cloud Integration is Coming: Are You Ready? | MuleSoft
 
The Emerging Integration Reference Architecture | MuleSoft
The Emerging Integration Reference Architecture | MuleSoftThe Emerging Integration Reference Architecture | MuleSoft
The Emerging Integration Reference Architecture | MuleSoft
 
Microservices and the Cloud based future of integration final
Microservices and the Cloud based future of integration finalMicroservices and the Cloud based future of integration final
Microservices and the Cloud based future of integration final
 
Chris O'Brien - Modern SharePoint sites and the SharePoint Framework - reference
Chris O'Brien - Modern SharePoint sites and the SharePoint Framework - referenceChris O'Brien - Modern SharePoint sites and the SharePoint Framework - reference
Chris O'Brien - Modern SharePoint sites and the SharePoint Framework - reference
 
How to Use Hybrid Integration Platforms Effectively
How to Use Hybrid Integration Platforms EffectivelyHow to Use Hybrid Integration Platforms Effectively
How to Use Hybrid Integration Platforms Effectively
 

Similar to Building APIs with NodeJS on Microsoft Azure Websites - Redmond

Benefits of an Open environment with Wakanda
Benefits of an Open environment with WakandaBenefits of an Open environment with Wakanda
Benefits of an Open environment with WakandaAlexandre Morgaut
 
Groovy & Grails eXchange 2012 vert.x presentation
Groovy & Grails eXchange 2012 vert.x presentationGroovy & Grails eXchange 2012 vert.x presentation
Groovy & Grails eXchange 2012 vert.x presentationStuart (Pid) Williams
 
Node.js to the rescue
Node.js to the rescueNode.js to the rescue
Node.js to the rescueMarko Heijnen
 
introduction to node.js
introduction to node.jsintroduction to node.js
introduction to node.jsorkaplan
 
End-to-end HTML5 APIs - The Geek Gathering 2013
End-to-end HTML5 APIs - The Geek Gathering 2013End-to-end HTML5 APIs - The Geek Gathering 2013
End-to-end HTML5 APIs - The Geek Gathering 2013Alexandre Morgaut
 
An Introduction to Node.js Development with Windows Azure
An Introduction to Node.js Development with Windows AzureAn Introduction to Node.js Development with Windows Azure
An Introduction to Node.js Development with Windows AzureTroy Miles
 
Vijay Oscon
Vijay OsconVijay Oscon
Vijay Osconvijayrvr
 
The future of server side JavaScript
The future of server side JavaScriptThe future of server side JavaScript
The future of server side JavaScriptOleg Podsechin
 
Introduction to node js - From "hello world" to deploying on azure
Introduction to node js - From "hello world" to deploying on azureIntroduction to node js - From "hello world" to deploying on azure
Introduction to node js - From "hello world" to deploying on azureColin Mackay
 
Kalp Corporate Node JS Perfect Guide
Kalp Corporate Node JS Perfect GuideKalp Corporate Node JS Perfect Guide
Kalp Corporate Node JS Perfect GuideKalp Corporate
 
Best Practices for couchDB developers on Microsoft Azure
Best Practices for couchDB developers on Microsoft AzureBest Practices for couchDB developers on Microsoft Azure
Best Practices for couchDB developers on Microsoft AzureBrian Benz
 
Построение простого REST сервера на Node.js | Odessa Frontend Code challenge
Построение простого REST сервера на Node.js | Odessa Frontend Code challengeПостроение простого REST сервера на Node.js | Odessa Frontend Code challenge
Построение простого REST сервера на Node.js | Odessa Frontend Code challengeOdessaFrontend
 
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...Emerson Eduardo Rodrigues Von Staffen
 
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...Amazon Web Services
 
FITC - Node.js 101
FITC - Node.js 101FITC - Node.js 101
FITC - Node.js 101Rami Sayar
 

Similar to Building APIs with NodeJS on Microsoft Azure Websites - Redmond (20)

Benefits of an Open environment with Wakanda
Benefits of an Open environment with WakandaBenefits of an Open environment with Wakanda
Benefits of an Open environment with Wakanda
 
Groovy & Grails eXchange 2012 vert.x presentation
Groovy & Grails eXchange 2012 vert.x presentationGroovy & Grails eXchange 2012 vert.x presentation
Groovy & Grails eXchange 2012 vert.x presentation
 
Node.js on Azure
Node.js on AzureNode.js on Azure
Node.js on Azure
 
Node.js to the rescue
Node.js to the rescueNode.js to the rescue
Node.js to the rescue
 
Nodejs
NodejsNodejs
Nodejs
 
introduction to node.js
introduction to node.jsintroduction to node.js
introduction to node.js
 
End-to-end HTML5 APIs - The Geek Gathering 2013
End-to-end HTML5 APIs - The Geek Gathering 2013End-to-end HTML5 APIs - The Geek Gathering 2013
End-to-end HTML5 APIs - The Geek Gathering 2013
 
An Introduction to Node.js Development with Windows Azure
An Introduction to Node.js Development with Windows AzureAn Introduction to Node.js Development with Windows Azure
An Introduction to Node.js Development with Windows Azure
 
Windows azure overview for SharePoint Pros
Windows azure overview for SharePoint Pros Windows azure overview for SharePoint Pros
Windows azure overview for SharePoint Pros
 
Vijay Oscon
Vijay OsconVijay Oscon
Vijay Oscon
 
Beginners Node.js
Beginners Node.jsBeginners Node.js
Beginners Node.js
 
The future of server side JavaScript
The future of server side JavaScriptThe future of server side JavaScript
The future of server side JavaScript
 
Introduction to node js - From "hello world" to deploying on azure
Introduction to node js - From "hello world" to deploying on azureIntroduction to node js - From "hello world" to deploying on azure
Introduction to node js - From "hello world" to deploying on azure
 
Node on Windows Azure
Node on Windows AzureNode on Windows Azure
Node on Windows Azure
 
Kalp Corporate Node JS Perfect Guide
Kalp Corporate Node JS Perfect GuideKalp Corporate Node JS Perfect Guide
Kalp Corporate Node JS Perfect Guide
 
Best Practices for couchDB developers on Microsoft Azure
Best Practices for couchDB developers on Microsoft AzureBest Practices for couchDB developers on Microsoft Azure
Best Practices for couchDB developers on Microsoft Azure
 
Построение простого REST сервера на Node.js | Odessa Frontend Code challenge
Построение простого REST сервера на Node.js | Odessa Frontend Code challengeПостроение простого REST сервера на Node.js | Odessa Frontend Code challenge
Построение простого REST сервера на Node.js | Odessa Frontend Code challenge
 
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
 
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
 
FITC - Node.js 101
FITC - Node.js 101FITC - Node.js 101
FITC - Node.js 101
 

Recently uploaded

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 

Recently uploaded (20)

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 

Building APIs with NodeJS on Microsoft Azure Websites - Redmond

  • 1. Building APIs with NodeJS on Microsoft Azure Websites Rick G. Garibay VP, Distinguished Engineer Level: Intermediate
  • 2. About Me • VP, Distinguished Engineer leading the Development Platform Group at Neudesic • Working on IoT, Intelligent Transportation and Hospitality & Gaming • Microsoft MVP, Microsoft Azure • Co-Author, “Windows Server AppFabric Cookbook” by Packt Pub. • Chairman, Co-Founder Phoenix Connected Systems User Group (PCSUG.org) • twitter: @rickggaribay • blog: http://rickgaribay.net • email: rick.garibay@neudesic.com | b-rigari@microsoft.com
  • 3. The problem with long URLs…
  • 4. http://mysadsharepointsite/not/rest/ful/Foo.aspx? RootFolder=%2Fpractice%2FConnected%5FSystem s%2FDocuments%2F5%2E%20Training%20Resourc es&FolderCTID=0x0120006C1E110A70E85644A26E 2C21A71B0D82&View={8F82FE4D-9398-4892- B6E6-C2D9C2AB2BE8}
  • 5. A terrible user experience at best.
  • 6. But worse, a missed opportunity…
  • 7. Every URL you send a customer, partner, prospect is an opportunity to make a branding impression.
  • 8. http://mysadsharepointsite/not/rest/ful/Foo.aspx? RootFolder=%2Fpractice%2FConnected%5FSystem s%2FDocuments%2F5%2E%20Training%20Resourc es&FolderCTID=0x0120006C1E110A70E85644A26E 2C21A71B0D82&View={8F82FE4D-9398-4892- B6E6-C2D9C2AB2BE8}
  • 10. Marketing Campaigns Advertisements Promotions Internal Communication A/B Testing
  • 11. neurl.it v0.1 • Shorten/Create – When I submit a long, ugly URL to the create API, I should get back a neurl. • Redirect – When I submit a neurl to the submit API, my request should be automatically redirected. • Hits – When I submit a neurl to the hits API, I should get back the number of hits/redirects for that neurl.
  • 12. http://mysadsharepointsite/not/rest/ful/Foo.aspx? RootFolder=%2Fpractice%2FConnected%5FSystem s%2FDocuments%2F5%2E%20Training%20Resourc es&FolderCTID=0x0120006C1E110A70E85644A26E 2C21A71B0D82&View={8F82FE4D-9398-4892- B6E6-C2D9C2AB2BE8}
  • 13.
  • 14.
  • 15.
  • 16. POST http://neurl.it/create HTTP/1.1 User-Agent: Fiddler Host: neurl.it Content-Type: application/json; charset=utf-8 Content-Length: 36 {"Url" : "http://rickgaribay.net"} HTTP/1.1 200 OK X-Powered-By: Express Content-Type: application/json; charset=utf-8 Content-Length: 57 Date: Fri, 08 Mar 2013 05:00:21 GMT Connection: keep-alive { "http://neurl.it/pewUGm" }
  • 17. What is NodeJS? • Server-side scripting framework based on the Google V8 engine accessible via JavaScript. • Asynchronous by nature, making it very performant. • Growing community and industry support, including libraries (modules).
  • 18. Hello Node // Say Hello via Console console.log("Hello World");
  • 19. Hello Node // Load the http module to create an http server. var http = require('http'); // Configure our HTTP server to respond with Hello World to all requests. var server = http.createServer(function (request, response) { response.writeHead(200, {"Content-Type": "text/plain"}); response.end("Hello Worldn"); }); // Listen on port 8000 server.listen(8000); // Put a friendly message on the terminal console.log("Server running at http://127.0.0.1:8000/");
  • 20. NodeJS Fundamentals • Node Package Manager (NPM) – Package manager for downloading and referencing thousands of NodeJS modules. • Package.json – Captures information about modules (including your project/module) and dependencies. • Server.js – Typical entry point to a NodeJS application but any .js will do. • Running NodeJS apps is as simple as this: > node server.js
  • 21. Client Event Loop Callback Workers IO Response
  • 22. Why Node? • My goal is not to convince you to use NodeJS over ASP.NET, Web API, WCF or any other back-end framework.
  • 23. Why Node? • Rather, I want to show you a practical example of what you can do with NodeJS. • Alternate implementations, either in NodeJS or other platforms, frameworks and languages is left as an exercise to the reader.
  • 24. Implementing the Create API SHOW ME TEH CODEZ
  • 25.
  • 26.
  • 27. GET http://neurl.it/pewUGm HTTP/1.1 User-Agent: Fiddler Host: neurl.it Content-Type: application/json; charset=utf-8 Content-Length: 0 HTTP/1.1 302 Moved Temporarily X-Powered-By: Express Location: http://rickgaribay.net Vary: Accept Content-Type: text/plain Content-Length: 56 Date: Fri, 08 Mar 2013 05:16:45 GMT Connection: keep-alive Moved Temporarily. Redirecting to http://rickgaribay.net
  • 28. Implementing the Redirect API SHOW ME TEH CODEZ
  • 29. GET http://neurl.it/pewUGm/hits HTTP/1.1 User-Agent: Fiddler Host: neurl.it Content-Type: application/json; charset=utf-8 Content-Length: 0 HTTP/1.1 200 OK X-Powered-By: Express Content-Type: text/html; charset=utf-8 Content-Length: 2 Date: Fri, 08 Mar 2013 05:21:37 GMT Connection: keep-alive 42
  • 30. Implementing the Hits API SHOW ME TEH CODEZ
  • 31.
  • 32.
  • 36. 10 free sites. Multi-tenant. Daily quotas 100 free sites. Multi-tenant. Daily quotas Unlimited. Dedicated VMs. No quotas Unlimited. Dedicated VMs. + more
  • 39. Deploy Neurl.it to Azure with Git & Scale DEMO
  • 41. Start Simple Get started with 10 free web sites Create new sites in seconds Easily manage and scale your sites Automatic load balancing and shared storage across instances Scale out or up to reserved instances for improved performance and scale
  • 42. Code Smart Use ASP.NET, ASP, PHP, or NodeJS SQL Azure or MySQL databases Start with open source apps and frameworks Develop with VS and WebMatrix Supports any Web development tool on any platform (Windows, OSX, Linux)
  • 43. Go Live Rapid deployment for quick iteration Integrated source control with Team Foundation Server (TFS) and Git Built-in monitoring of perf and usage data Quick access to request logs, failed requests diagnostics and diagnostics
  • 44. Resources • Building Hypermedia APIs with HTML5 and Node by Mike Amudsen • Express http://expressjs.com/ • Mocha http://visionmedia.github.com/mocha/ • Should https://github.com/lukebayes/node-should • SuperTest https://github.com/visionmedia/supertest • MongoDb http://www.mongodb.org/ • Mongoose https://github.com/LearnBoost/mongoose • Fiddler http://www.fiddler2.com/fiddler2/ • Microsoft Azure: http://Azure.com • Configuring Domain Names on Azure Websites http://bit.ly/1pvOclY Azure CLI http://azure.microsoft.com/en-us/ documentation/articles/xplat-cli/
  • 45. About Me • VP, Distinguished Engineer leading the Development Platform Group at Neudesic • Working on IoT, Intelligent Transportation and Hospitality & Gaming • Microsoft MVP, Microsoft Azure • Co-Author, “Windows Server AppFabric Cookbook” by Packt Pub. • Chairman, Co-Founder Phoenix Connected Systems User Group (PCSUG.org) • twitter: @rickggaribay • blog: http://rickgaribay.net • email: rick.garibay@neudesic.com | b-rigari@microsoft.com