introduction to node js, express, jade, mongo db

10
Introduction to Node js, Express, Jade, MongoDB

Upload: nibodha-technologies

Post on 04-Aug-2015

107 views

Category:

Software


3 download

TRANSCRIPT

Page 1: Introduction to Node js, Express, Jade, Mongo DB

Introduction to Node js, Express, Jade, MongoDB

Page 2: Introduction to Node js, Express, Jade, Mongo DB

Node Js???Pros

Server side javascript

An asynchronous, event-driven framework built on Chrome's V8 JavaScript engine 

Page 3: Introduction to Node js, Express, Jade, Mongo DB

Node JS???

Designed for creating easily built and scalable network applications

Uses a non-blocking, asynchronous architecture 

Lightweight and efficient

Single threaded

Active development community for support

Best suited for data-intensive real-time applications that run across distributed devices.

Cons

NOT for CPU intensive applications

Nested callbacks can reduce code readability

Page 4: Introduction to Node js, Express, Jade, Mongo DB

NPM – Node Package Manager

An online repository for the publishing of open-source Node.js projects

Like Maven or Ruby Gems

Easy dependency management

Easy package installation

Easy version management

Plethora of node.js libraries and applications are published on npm

Page 5: Introduction to Node js, Express, Jade, Mongo DB

Express Web framework for Node

Features such as rendering, routing and REST controls.

Jade Templating Language for writing HTML templates.

Produces HTML

Supports dynamic code

Supports reusability

Page 6: Introduction to Node js, Express, Jade, Mongo DB

MongoDB

NoSQL database

Does not require a predefined schema as in other RDMS

Data stored as documents, JSON, key-values

Schema can be easily changed

Can be horizontally distributed across servers easily

Adding or Removing a server is easy

Open Source

High scalability

Big Data ready

Monk, Mongoskin are some of the tools used to connect to MongoDB

Page 7: Introduction to Node js, Express, Jade, Mongo DB

Let’s get Started- Installing Node

Download the installer from Node.js website

Run it -> Node Js is installed!

Open cmd and cd to directory where you want to store your Node Js app

npm install –g express

npm install –g express-generator

Page 8: Introduction to Node js, Express, Jade, Mongo DB

Lets create an Express Project

Express projectname

Creates your project with all the necessary packages

Package.json has the dependencies listed

npm install

Installs all dependencies to your project

Npm start – has your project up and running

Page 9: Introduction to Node js, Express, Jade, Mongo DB

Walk through the demo

Page 10: Introduction to Node js, Express, Jade, Mongo DB

Thank You