Develop & Deploy Node.js app on Windows Azure

3,031 views

Published on

It's the keynote on Telkom Bandung Digital Valley's TechThursday. I talked about developing and deploying Node.js application on Windows Azure.
Attented by 20 web developers around Bandung city.

To try the code I demoed, here's the repo:
https://github.com/andriyadi/NodeAzureStorageSocketIO

Published in: Software, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
3,031
On SlideShare
0
From Embeds
0
Number of Embeds
2,033
Actions
Shares
0
Downloads
11
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Develop & Deploy Node.js app on Windows Azure

  1. 1. Node.js App on Windows Azure BDV TechThursday, Jun 26, 2014 a@dycode.com | @andri_yadi | http://andriyadi.com
  2. 2. about me
  3. 3. CEO of
  4. 4. a movie freak movreak
  5. 5. start up companies for 10 years 15 years in software development
  6. 6. 6 years in a row 1 of 2 Azure MVPs in Indonesia, 
 of 114 in the worlds
  7. 7. The first & largest iOS & OSX developer community in Indonesia ID-ObjectiveC President
  8. 8. Focus on Demo :) Disclaimer
  9. 9. Only 5 years old But seems everybody use it!
  10. 10. Node.js on Raspberry Pi
  11. 11. A platform with event-driven, non-blocking IO model, built on Chrome JavaScript runtime What???
  12. 12. Event-drive Non-blocking Asynchronous I/O Model
  13. 13. De facto language for the web Event-driven Node.js = JavaScript on server JavaScript
  14. 14. Chrome’s JavaScript runtime V8 is really fast It’s (sort of) compiled V8
  15. 15. var http = require('http'); http.Server(function (req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('Hello Worldn'); }).listen(3000); HTTP Server A simple standalone working HTTP server Web development from the scratch :)
  16. 16. Built-in modules Third-party (> 80,000) Build your own :) Highly modularised
  17. 17. Node Package Manager NPM
  18. 18. Install Node.js from pre-built installers, or build from source code
 http://nodejs.org/download/ Get started?
  19. 19. Enough slides! 
 Show me some code Your wish is my command
  20. 20. Real-world web development should use this module! ! npm install express ! or if you’ve installed express-generator module, 
 just type: express Express
  21. 21. More code please! Your wish is my command
  22. 22. To Do List demo
  23. 23. Enables real-time bidirectional event-based communication ! npm install socket.io ! *Socket.IO 1.0 is different than 0.9.x. Make sure to read migration guide. Socket.io
  24. 24. Change prev demo with Socket.IO
  25. 25. on “connection” event “alltasks” event “addtask” event broadcast “newtask” event “completetask” event broadcast “taskcompleted” event Socket.IO realtime events No need to post data via HTTP POST!
  26. 26. Node.js on Windows Azure What???
  27. 27. Among other things, Azure provides:
  28. 28. Some of Azure Service...
  29. 29. Supported Web Frameworks Or any custom FastCGI Handler For you, web developers
  30. 30. So, how to deploy Node.js app to Windows Azure? I use Mac as development machine :) Disclaimer
  31. 31. azure-cli is your friend npm install azure-cli -g Azure-CLI
  32. 32. Get Azure account. Buy or free trial :) ! Login to Azure and select subscription (if > 1): ! azure account download azure account import <file> azure account set <subscription> Deploy Node.js on Azure Website
  33. 33. Creating website from current directory: ! azure site create —-git git add . git commit -m "First Commit” git push azure master ! That’s it! Deploy Node.js on Azure Website
  34. 34. More detail articles: • http://azure.microsoft.com/en-us/documentation/ articles/xplat-cli/ • http://azure.microsoft.com/en-us/documentation/ articles/storage-nodejs-use-table-storage-web-site/ ! There’re more options to deploy Node.js to Azure. Just check here: http://azure.microsoft.com/en-us/develop/nodejs/ Deploy Node.js on Azure Website
  35. 35. Get your hand on iOS 8 
 or Node.js? Let’s join upcoming iOS 8 & Node.js development class! More info: 
 http://dycode.co.id 
 edu@dycode.com ADS
  36. 36. Discussion
  37. 37. Live demo http://intro2node.azurewebsites.net/ I’ll keep alive as long as possible :)
  38. 38. Source code https://github.com/andriyadi/ NodeAzureStorageSocketIO To run, follow instruction there. Good luck :)
  39. 39. a leading mobile & web apps developer, an early adopter, an award-winning company
  40. 40. DyCode www.dycode.com office@dycode.com @dycode

×