By Nawaz Dhandala By Nawaz Dhandala Store data with CloudBoost's CloudObjects CloudBoost is a Database Service with storage, search and real-time capabilities. Think of CloudBoost as Parse + Firebase + Algolia all combined into one. CloudBoost has SDK's in multiple platforms which helps you build web, mobile and IoT apps without dealing with the backend and database infrastructure. Read more...

By Nawaz Dhandala By Nawaz Dhandala Turbo Charge your NodeJS app with Cache Caching is great for your apps because it helps you to access data much faster when compared to the database. On the downside, querying is limited and it is very expensive (money-wise) because all the data is on the memory (which is expensive) instead of being on a disk. It is recommended that you use cache only for frequently accessed data. Read more...

By Lenny Witman By Lenny Witman Node.js For Beginners. Deploy Your Blog to Heroku Error pages are not what typically appear on your screen when you're surfing the web, but when it happens it's so annoying! To see how servers work from within, we will build a simple web server by ourselves. We will use Node.js as a server part technology for that task. Then we'll use Heroku cloud application platform to turn this local server into a world wide server. Read more...

By Chad Wyszynski By Chad Wyszynski Solving Coding Challenges with Streams My first experience using Node.js for a programming challenge was agonizing. I devised a viable solution, but I couldn’t figure out an effective way to parse the input. The format was painfully simple: text piped via stdin. No problem, right? I burned over half my time on what should have been a minor detail, and I ended up with a fragile, zip-tie and duct tape hack that still makes me shudder. The experience inspired me to find an idiomatic approach to programming challenges. After working through more problems, I arrived at a pattern I hope others will find useful. Read more...

By Tim Caswell By Tim Caswell Generators vs Fibers Both ES6 generators and node-fibers can be used to block a coroutine while waiting on some I/O without blocking the entire process. This means that you can wait for an I/O result within your code but still have the performance benefits of the single-threaded, non-blocking I/O model you all know and love. Both can do this for arbitrarily deep call stacks. The main difference between the capabilities of the two is how explicit the syntax is. It's the classic battle between wanting to be safe while wanting to be flexible. Read more...

By Swapnil Mishra By Swapnil Mishra Simplifying Chores with Grunt Often in various stages of development we perform repetitive tasks e.g minification, compilation, unit testing, linting and we would definitely want to automate them. But each of these task require different configurations or installations. What if there is a system where in we can easily configure and run these tasks from a single place. Also it would be really nice if it gels well with Node.js system. Meet Grunt a task runner for simplifying chores. Apart from being simple Grunt ecosystem is huge and it's growing every day with literally hundreds of plugins to choose from. Note that I will be using grunt task/plugin interchangeably which means the same. Read more...

By Tim Caswell By Tim Caswell Daddy, what's a stream? At dinner tonight, I was discussing that I've been thinking about streams and how to simplify them in JavaScript. My 7-year-old perked up and asked me: Daddy, what's a stream? I explained that a stream is like a line of water along the ground. If you dig a trench on a hill and fill up the high end using a water hose the water will run down the hill along the trench. This is one of his favorite hobbies in the back yard, so he understood completely. I explained that when new water is added to the top, it eventually makes its way to the bottom of the stream. The end where water comes from is called the upstream and the other end is the downstream. Gravity pulls water down. Read more...

By Jean-Philippe Monette By Jean-Philippe Monette Content Syndication with Node.js Web syndication is a must for any Website wishing to share some entries easily to other systems. Better known under their format name like RSS) or Atom), they can be quite time consuming to generate without a module handling all their formating. Thanks to the power of Node's package manager NPM, you can generate yours in no time. Read more...

By Shahar Kedar By Shahar Kedar Session-based Authorization with Socket.IO Finding a decent article about session based authorization in socket.io is more difficult than one expected. This article will show how you can take advantage of Express session middleware and socket.io authorization middleware to create a very simple authorization mechanism when establishing new socket.io connections. Read more...

By Vojta Jina By Vojta Jina Make Your Tests Deterministic Non-deterministic issues like race conditions or thread deadlocks are very difficult to test, because they are by nature hard to reproduce. Fortunately, in the JavaScript world, we only have a single thread, so we are safe, right? Well, not really because... Execution order of callbacks can cause the same race condition issues that plague multi-threaded environments. Read more...

By Dumitru Glavan By Dumitru Glavan Sending e-mails with Node and NodeMailer Sending e-mails with NodeJS is almost a breeze. Almost. First, you have to plug-in the NodeMailer module than set up a transport type, load the templates, add attachments and finally send... Read more...

By Srirangan By Srirangan Node.js and MongoDB - Getting started with MongoJS It won't be an exaggeration if one claims that in the past few months Node.js and MongoDB have literally taken the software and web industries by storm. Not just bleeding-edge startups but even medium and large enterprises are leveraging these two technologies to deliver a better experience to their users by build more capable, performant and scalable apps. So what is Node.js? Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices. ..and what is MongoDB? MongoDB is a scalable, high-performance, open source NoSQL database. This post will cover the basics and get you started with your Node.js + MongoDB app. Make sure you have Node.js installed and MongoDB setup on your developer machine. Let's verify your Node.js installation and start the MongoDB server: $ node - v

$ mongod

Read more...

By Srirangan By Srirangan Really simple file uploads with Express Few days ago I was working on a fairly typical web application and I faced the challenge of implementing a fairly typical web application feature - file uploads. It was the first time I was implementing file uploads with Node (and Express) and I did what anyone else would do - I googled it. Unfortunately all the articles / posts out there are either outdated, too complex or plain wrong. So I did the next most obvious thing - post a question on the mailing list. As always Mr. Holowaychuk was incredibly quick to respond. His answer lead me to do what I should have done in the first place - read the docs. Read more...