More Related Content
Similar to Introduction to Node.js by Vinothini B
Similar to Introduction to Node.js by Vinothini B (20)
Introduction to Node.js by Vinothini B
- 2. Agenda
• Introduction
• Getting started
– Basic Install, Web App (Express, Jade)
• Samples
– Sample app in Express
– Sample app in Geddy
© Spritle Software Private Limited | http://www.spritle.com
- 3. Introduction - I
• Node.js is a platform built on Chrome's
JavaScript runtime for easily building fast,
scalable network applications.
• Node.js uses an event-driven, non-blocking
I/O model that makes it lightweight and
efficient, perfect for data-intensive real-time
applications that run across distributed
devices.
© Spritle Software Private Limited | http://www.spritle.com
- 4. Introduction - II
• JavaScript everywhere
• Files I/O and DB queries are non-blocking
• Great performance even while handling a big
number of users
• Set of tools and libraries living on top on V8
© Spritle Software Private Limited | http://www.spritle.com
- 5. Bring it to Your Machine
• Install nvm (node version manager)
– like rvm in ruby world
– nvm install 0.10.8
• rvm install ruby 2.0.0
• Use npm to install node packages
– like gem in ruby world
– npm install –g express
• gem install faker
© Spritle Software Private Limited | http://www.spritle.com
- 6. WebApp in a Minute
npm install -g express
express --sessions vb_songs
create : vb_songs
create : vb_songs/package.json
create : vb_songs/app.js
create : vb_songs/routes
create : vb_songs/routes/index.js
create : vb_songs/routes/user.js
create : vb_songs/views
create : vb_songs/views/layout.jade
create : vb_songs/views/index.jade
create : vb_songs/public/images
create : vb_songs/public/javascripts
create : vb_songs/public
create : vb_songs/public/stylesheets
create : vb_songs/public/stylesheets/style.css
npm install
node app.js
Spritle Software Private Limited | http://www.spritle.com
- 7. Code Walk-through with Samples
• vb_songs app – Sample app
–package.json
• Like Rails Scaffolding – Sample CRUD
–geddy | compound
© Spritle Software Private Limited | http://www.spritle.com
Editor's Notes
- Reference: http://www.slideshare.net/martincabrera/node-js-presentation
- Reference: http://www.slideshare.net/martincabrera/node-js-presentation
- Talk about https://npmjs.org/ like how it is at ruby-gems.org