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

Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 

Recently uploaded (20)

Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 

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