Understanding click binding in Knockout.js

Click Binding adds click event to element on View. You can do click binding with any function in ViewModel or you can bind to any normal function. Let us try to understand it with a very simple ViewModel. We have a ViewModel as below As you see there is one function as property of ViewModel … Continue reading Understanding click binding in Knockout.js

Create REST API on Node.js using Visual Studio

Find Source Code on Github In this post I am not going to explain, what is REST? I assume you are already aware of REST concepts hence on this post to create REST API on Node.js which will perform CRUD operations. I am going to use Visual Studio to create Node Application and before you … Continue reading Create REST API on Node.js using Visual Studio

Create a Router in Node.js using crossroads

Routers are very important in any web server. Primary function of a Router is to accept request and on basis of requested URL trigger desired process. Consider a rough example in that client is requesting http://abc.com/users/myprofile and there request may serve from URL http://abc.com/node/2 assuming user is stored in node with id 2. In Node.js … Continue reading Create a Router in Node.js using crossroads

Error: `doctype 5` is deprecated, you must now use `doctype html`: Node.js Express App bug solved

I am using Visual Studio to create Node.js application. I created a Node project by selecting Blank Express Application project template from JavaScript project type. After creating project I pressed F5 to run application. On running application I got following error Solving this error is very easy. From views folder in project open layout.jade. You … Continue reading Error: `doctype 5` is deprecated, you must now use `doctype html`: Node.js Express App bug solved

Control Flow bindings in Knockout.js

You can control flow of element on the view using Control Flow bindings of Knockout.js. There are four Control Flow bindings foreach binding if binding ifnot binding with binding Out of these four bindings foreach and if bindings are used very often. foreach binding foreach binding repeat same markup for number of times equivalent to … Continue reading Control Flow bindings in Knockout.js

How to upload file in Node.js

In this post we will take a look on uploading a file on a web server created using Node.js. stream in Node.js makes this task super easy to upload files or for that matter working with any data transfer in between server and client. To upload file we will work with two modules http and … Continue reading How to upload file in Node.js

Create Echo Server in Node.js

Creating HTTP server in Node.js is very simple. In this post we will learn to create an echo server using Node.js. Before we move ahead, let us understand what an echo server is. In echo server, client sends data to server and server returns back same data to server. To create echo server, let us … Continue reading Create Echo Server in Node.js