In our node js application, we can use variety of templating engines like "jade" , "ejs", "mustache" etc. Dust.js is an asynchronous templating engine which can be used both on server side as well as client side and provide easy caching with high performance. In my previous blog on EJS as a templating engine, i have mentioned how we...
In one of our Node.js projects, we used Mongoose module to interact with MongoDB. Mongoose provides us four types of built-in validation on schema as below: 1. Required: We can mark a field as required, which must be provided. 2. Limit: If field is type of Number in Schema, then we can restrict maximum and minimum value for that...
I was working on one of my projects which involved multiple task execution on regular basis. Well, I think that many of us have faced similar issues on their projects which increases our work and making it more time-consuming and increased work. Working in a community where people are actively developing tools to automate tedious...
EJS as the name implies embedded JavaScript, is a JavaScript templating library used to render html code along with JSON data in an easy and clean way. In a Node.JS application(here we are using an express application), you need to set the value of 'view engine' parameter to 'ejs'. [js] var app = express(); app.set('view engine',...
In my previous blog we discussed about “Readable Streams in Node.js”. Here we will be learning about the next part of stream which is, writable stream. Writable stream is used to write data to a specific destination. Basically its has two main method : write. end Write: ...
Within Node.js development, streams are used to transfer data including requests to an HTTP server, opening a file, stdin, stdout, stderr etc. Streams can be readable, writable or both. We can connect the readable stream to a writable stream using the pipe method. All streams are instances of event emitters in node.js. We can get...
Two commonly known ways to execute a script in Node.JS are using eval () function or running it using VM module. Lets see this through an example: [js] var vm = require('vm'); this.name = "Sakshi"; var script = "this.name = 'Tyagi'", withVM, withEVAL; withEVAL = eval(script); console.log("withEVAL...
In extension to my previous blog on Event Emitters Event Emitters In Node.JS, here we will see some variations in implementing Event Emitters. We can bind more than one listeners to an event. For example: [js] var events = require('events'); var eventEmitter = new events.EventEmitter(); var printFruit = function printFruit() { ...
Event Emitters are used to create and manage our own events and trigger them accordingly. We can bind listeners and emit those events whenever required. Example : [js] var events = require('events'); var eventEmitter = new events.EventEmitter(); eventEmitter.on('Morning', function welcomeMessage() { console.log('Good...
IntelliGrape has just completed its participation in Node KnockOut, Biggest Node JS programming competition. The event is described as 48 hours Hackathon featuring Node.JS where more than 400 teams/individuals across the globe participated with the motive to start an app from scratch and submit their final version of app as the time...
Express JS is a very flexible yet powerful framework on top of exponentially growing Node JS Environment. Express makes it really easy to handle requests and how the server interacts with the outside world. It is very simple to get going and it has immense amounts of extremely useful features, Middleware is one of those features of...
AngularJS, Front End Development
Showing data in the form of Graphical/Pictorial Representation is always a better way to present data than simple text. Users find data represented in pictorial manner more interactive and easy to understand than data in complex tables or lists. Cases where Pictorial data representation (Charts or Graphs) can be more user friendly: ...