Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

An Introduction to node.js

664 views

Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

An Introduction to node.js

  1. 1. An Introduction 9. . 2012 { Patrick Heneise @PatrickHeneise
  2. 2. What is node.js?“Node.js is a server side software system designed for writing scalableInternet applications, notably web servers. Programs are written on the serverside in JavaScript, using event-driven, asynchronous I/O to minimize overheadand maximize scalability.” - http://en.wikipedia.org/wiki/Nodejs
  3. 3. Server Side Software SystemYet Another Web Framework
  4. 4. event-driven, asynchronous I/O for V8
  5. 5. Traditional Multithreadingwith Apache
  6. 6. Apache Nginx 40 30Memory in MB 20 10 0 0 500 1000 1500 2000 2500 3000 3500 4000 Concurrent Connections http://blog.webfaction.com/2008/12/a-little-holiday-present-10000-reqssec-with-nginx-2/
  7. 7. The Pizza Example
  8. 8. Event Loop
  9. 9. JavaScript
  10. 10. [...] if you work on the web, love it or hate it, you’regoing to have to work with JavaScript at some point.
  11. 11. Installation
  12. 12. http://nodejs.orgHit INSTALL
  13. 13. brew install node
  14. 14. Hello World!
  15. 15. var http = require(http);http.createServer(function (req, res) { res.writeHead(200, {Content-Type: text/plain}); res.end(Hello Worldn);}).listen(1337, 127.0.0.1);console.log(Server running at http://127.0.0.1:1337/);
  16. 16. Twitter Demo
  17. 17. What is node.js?Basic theoryInstallationHello WorldTwitter Worldnpm - the node package manager
  18. 18. NPM Counthttp://npm-count.jit.su
  19. 19. NPM Ruby Gems pip3000022500150007500 0 11/09/2012 Number of Modules npm vs. gem vs. pip
  20. 20. Node Deployment
  21. 21. jitsu deployhttp://nodejitsu.com
  22. 22. Helicopters! Flying robots & node.jshttp://nodecopter.com
  23. 23. SummaryExtremely fast operationsV8 RuntimeRapidly growing ecosystemSuper easy deployment, free developer servicesJavaScript
  24. 24. More...http://nodemanual.org/0.8.14/nodejs_dev_guide/index.htmlhttp://nodestack.org/videoshttp://net.tutsplus.com/tutorials/javascript-ajax/this-time-youll-learn-node-jshttp://www.youtube.com/user/lxjs2012http://www.meetup.com/nodejs-bcn/https://github.com/PatrickHeneise/nodejsbcn-bcnstartupmap
  25. 25. Q&A
  26. 26. Thanks

×