jspro.com jspro.com

An Overview of JavaScript Promises

This tutorial covers the basics of JavaScript promises, showing how you can leverage them in your JavaScript development. The concept of promises is not new to web development. Many of us have already used promises in the form of libraries such as Q, when.js, RSVP.js, etc. Even jQuery has something called a Deferred object, which is similar to a promise. But now we have native support for promises in JavaScript, which is really...

sitepoint.com sitepoint.com

Getting Started with React and JSX

$(function(){ $(".sp_unhider").click(function(e) { var $target = $("#" + $(this).data("target")); $target.toggleClass("sp_hide"); $(this).text($target.is(":visible")? "Hide this" : "Show me what the above snippet would look like without JSX"); }); }); /* For hiding / showing the extra block */ .sp_hiddenblock { margin: 0 0 15px 0; border: 1px solid rgb(250, 197, 82); border-radius: 3px; padding: 5px; ...

jspro.com jspro.com

The Basics of Node.js Streams

Node.js is asynchronous and event driven in nature. As a result, it's very good at handling I/O bound tasks. If you are working on an app that performs I/O operations, you can take advantage of the streams available in Node.js. So, let's explore Streams in detail and understand how they can simplify I/O. What are Streams Streams are unix pipes that let you easily read data from a source and pipe it to a destination. Simply put, a...

sitepoint.com sitepoint.com

The Basics of Node.js Streams

Node.js is asynchronous and event driven in nature. As a result, it’s very good at handling I/O bound tasks. If you are working on an app that performs I/O operations, you can take advantage of the streams available in Node.js. So, let’s explore Streams in detail and understand how they can simplify I/O. What are Streams Streams are unix pipes that let you easily read data from a source and pipe it to a destination. Simply...

sitepoint.com sitepoint.com

Configuring Nginx and SSL with Node.js

Nginx is a high performance HTTP server as well as a reverse proxy. Unlike traditional servers, Nginx follows an event driven asynchronous architecture. As a result the memory footprint is low and performance is high. If you are running a Node.js based web app you should seriously consider using Nginx as a reverse proxy. Nginx can be very efficient in serving static assets. For all other requests it will talk to your Node.js backend...