Introduction to Node js, Express, Jade, Mongo DB - 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.
2. Node Js???
Pros
Server side javascript
An asynchronous, event-driven framework built on Chrome's V8 JavaScript
engine
3. 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
4. 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
5. 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
6. 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
7. 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
8. 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