Below you will find pages that utilize the taxonomy term “nodejs”

Using Node, Redis, and Kue for Priority Job Processing

Code for tutorial available on Github Get Your Priorities Straight Chances are that if you’ve worked on the server side of things for long enough, you’ve probably run into a situation where you need a queue of some sort to handle messaging, processing, or any sort of orderly task execution. In this tutorial, we’ll be using a certain type of queue — the priority job queue — to help us solve a fairly common problem: payment processing.

Using Event Emitter in Node.js

a “stream” of events, being emitted from a waterfall… eh? ¯\(ツ)/¯ tl;dr: In this post we will look at using the Event Emitter module in node.js and how we might use it to create our own event-emitting programs. The repo with some sample code can be found at https://github.com/markthethomas/eventEmitterFun If you’ve worked with client-side JavaScript, you will be familiar with the notion of events. Or, at the very least, I really really hope you are — JavaScript isn’t much fun without one of its core concepts/principles.

Dockerizing a Node.js Web Application

Several months ago, I wrote about how you might go about ‘dockerizing’ a node.js web application. I was able to write an expanded version of this post for Semaphore CI’s Community site. I am re-posting it here — enjoy! Dockerizing a Node.js Web Application Introduction If you’ve ever developed anything that needs to ‘live’ somewhere besides your local machine, you know that getting an application up and running on a different machine is no simple task.

React Native: Quick Start and Including Images

Origin Story I asked a question on Stack Overflow about ~7 months back (at time of writing) about requiring and including images in react native. I figured it was a simple misunderstanding on my part about the directory structure(s) used in iOS development, but it turned out to be both 1) something other people were curious about and 2) an area where the react native team was still stabilizing the API.

New NPM Module: Favorites

I don’t know about you, but there are a few modules that I tend to use really often in the projects I’m working on. I usually go with some combination of eslint, lodash, babel, and a number of others. I’ve written briefly about some of my favorites here and here. I also find myself trying to stay current with the latest version of node for security considerations as well as all the other good that comes from using the current stable version.

Method Chaining in JavaScript

Are you still a JavaScript padawan learner? Then this post is for you. Maybe you’re still going over the basics of JavaScript, learning how to define functions, how objects work, and some of the other baby steps. And maybe you’ve toyed around with that semi-well known library for querying the DOM (and for doing wayyyy too many other things, IMO), le jQuery. If you have or if you’ve tried out another library, you’ve likely seen something like this:

Npm Modules I can't live without (pt. 2)

I’ve been writing a three-part series on some great modules I love and use. This is part two, but make sure to check out the first post. Eslint: If you’re not doing static analysis on your code, you’re carrying around a giant foot-gun…and probably using it, often. Eslint comes from the jsHint/jsLint school of thought, but with some notable differences: Espree for parsing, an AST for analysis, and it’s very pluggable.

Running Node.js Apps in Production

tl;dr: In this post I’ll highlight three modules that you can use to to run your node app in production: using forever, nodemon, and PM2. So it’s pm2 vs forever vs nodemon. Each has its own strengths and weaknesses: forever is the most general, nodemon the best suited for development, and PM2 is the most comprehensive and best-suited for production. Production Ah, Production™. That happy place where everything is supposed to go smoothly and serenely1, where programs are their supposed to be their best, most efficient and bug-less selves.

Server-Side Rendering with React and React-Router

update: This post was last updated on 4/16/16 w/ more-recent react-router. tl;dr: React is the only framework you ever need to learn again! Proclaim it’s superiority from the mountaintops! No longer will we be trapped in the chains of Angular, Ember, Backbone…REACT IS FREEDOM. Eh…Jk. React is really great, but please don’t be that person. We need to love all the frameworks equally, lest we just keep reinventing them over and over and over…and over again ;) I’m way off track of this tl;dr now.

Dockerizing A Node.JS Web App (again)

*tl;dr: You might have seen or read the Docker tutorial Dockerizing a Node.js web app; this is another take on how you might go about doing just that if you need a more flexible approach than the one you can find in the Docker docs (how are they not called docks?!).* Head here to check out the sample Dockerfile. ##Ahoy! I’ve been working on a small side-project/really-small startup called Charityware.

Installing iojs and Node.js Together

##iojs If you’re even remotely involved with the Node community at all, you’ve likely heard about a fork (of sorts) that has been in process for the past several months. That fork is iojs, and it aims to try out an open-governance model that the Node/iojs community has more ownership of (rather than waiting on Joyent). There’s a great NodeUp podcast that you can listen to if you want to get more if the inside scoop on iojs.