introduction to node.js by vinothini b
DESCRIPTION
TRANSCRIPT
© Spritle Software Private Limited | http://www.spritle.com
Introduction to Node.js
Vinothini B
© Spritle Software Private Limited | http://www.spritle.com
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
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
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
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
WebApp in a Minute
npm install -g expressexpress --sessions vb_songs
create : vb_songscreate : vb_songs/package.jsoncreate : vb_songs/app.jscreate : vb_songs/routescreate : vb_songs/routes/index.jscreate : vb_songs/routes/user.jscreate : vb_songs/viewscreate : vb_songs/views/layout.jadecreate : vb_songs/views/index.jadecreate : vb_songs/public/imagescreate : vb_songs/public/javascriptscreate : vb_songs/publiccreate : vb_songs/public/stylesheetscreate : vb_songs/public/stylesheets/style.css
npm installnode app.js
© Spritle Software Private Limited | http://www.spritle.com
Code Walk-through with Samples
• vb_songs app – Sample app–package.json
• Like Rails Scaffolding – Sample CRUD–geddy | compound
http://www.Spritle.comCopyright: Spritle Software Private Limited
Thank you&
Questions