Introduction to Node js, Express, Jade, MongoDB
Node Js???Pros
Server side javascript
An asynchronous, event-driven framework built on Chrome's V8 JavaScript engine
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
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
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
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
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
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
Walk through the demo
Thank You