The JavaScript blog.


node project-management modules apps slides presentations react

NewSprint, Spectacle

Posted on .


NewSprint (GitHub: rodati/newsprint, License: MIT, npm: newsprint) from Rodati is a command-line Node tool for generating a mobile-friendly email based on Trello cards.

I use Trello for project management, and for a while I archived each week (or sprint) into a list so it was easy for management to see what we've completed recently. This process could be automated with NewSprint, by sending an email with card summaries. The emails look very nice, and I like the fact it uses a command-line tool with JSON files for configuration.



Ken Wheeler sent in Spectacle (GitHub: FormidableLabs/spectacle, License: MIT, spectacle), a React-powered presentation library.

With Spectacle you can write slides with JSX. It supports tags like <Deck>, <Slide>, and there are even layout tags for making text appear in the right place without too much fiddling about with CSS. Here's a very basic example of a slide:

export default class extends React.Component {  
  render() {
    return (

It even supports a presenter view, so you can see the next side and the current time. If you're currently addicted to React then this will probably be preferable to messing around in Keynote/PowerPoint/etc.


apps realtime servers node

A Server for Realtime Apps: deepstream.io

Posted on .


Wolfram Hempel sent in an open source server called deepstream.io (GitHub: hoxton-one/deepstream.io, License: MIT, npm: deepstream.io). Deepstream is a Node server that allows clients to sync data, whether they're browsers or mobile applications. It has a caching layer, and supports event-based messaging and RPC.

If you install deepstream.io with npm, you can create a simple server like this:

var DeepstreamServer = require( 'deepstream.io' );  
var server = new DeepstreamServer();

server.set('host', 'localhost');  
server.set('port', 6020);


Then in the browser you can connect with var ds = deepstream('localhost:6020').login(). The ds object can be used to fetch and set data. The tutorial shows how to do this with a simple HTML form:

var record = ds.record.getRecord('someUser');  
var input = document.querySelector('input');

input.onkeyup = function() {  
  record.set('firstname', input.value ;

record.subscribe('firstname', function(value) {  
  input.value = value;

The RPC calls allow functions to be bound to function names. One nice property of RPC in deepstream is if multiple clients are able to provide the same RPC, it will distribute requests evently between them.

The project is still new, but there are a good amount of tutorials already, including React and Angular examples.


meteor books plugins databases servers apps mysql sponsored-content jquery

Your First Meteor Application, OData Server, ItemSlide.js

Posted on .

Your First Meteor Application

Your First Meteor Application

David Turnbull's Your First Meteor Application is a highly focused, beginner-friendly introduction to Meteor. David updates the book regularly when Meteor changes, so it's worth checking back every so often to look for new content.

You can read the book online or download the PDF for free. If you prefer video, there are also screencasts for $39.

OData Server

The OData Server (GitHub: gizur/odataserver, License: MIT, npm: odataserver) by Jonas Colmsjö is an OData server that's backed by MySQL. It's easy to drop into an Express project, and it's designed to work as a quick "mobile backend as a service" type of app.

It has a simple HTTP API, and Jonas has included usage examples for curl that show you how to create users, databases, and insert data. It actually does things like MySQL database and schema creation, so it requires a MySQL administrator account to work correctly.

If you're interested in this and want to quickly try it out, the advanced usage guide has instructions for deploying it to Docker.


ItemSlide.js (GitHub: itemslide/itemslide.github.io, License: MIT, npm: itemslide) by Nir Lichtman is a touch-friendly carousel.

With jQuery you can set it up like this:

var carousel = $('ul');  
carousel.itemslide({ swipe_out: true });  

And it has events for responding to user interaction:

carousel.on('pan', function(e) {});  
carousel.on('changeActiveIndex', function(e) {});  
carousel.on('changePos', function(e) {  
  console.log('new pos:', carousel.getCurrentPos());
carousel.on('swipeout', function(event) {  
  console.log('swiped out slide:', event.slide);

You don't have to use it with jQuery, but if you do you'll get things like mousewheel support.


apps browser routing chat

GitterCLI, Wayfarer

Posted on .


I'm pleased to see that applications made with Blessed are starting to trickle into the DailyJS inbox! GitterCLI (GitHub: RodrigoEspinosa/gitter-cli, License: MIT, npm: gitter-cli) by Rodrigo Espinosa Curbelo is a Gitter client for the terminal. Those of us that are seasoned IRC veterans aren't too fond of web chat clients, and although Gitter has IRC access, GitterCLI could potentially take advantage of Gitter-specific features.

It uses the node-gitter module, and works using the standard HTTP authentication API implemented by Gitter. One thing I noticed was it drops authentication tokens into a "secrets" JSON file, and I couldn't work out if it checks to see if the permissions are safe (i.e., not readable system-wide). So you might want to check the secrets file when running it on a shared server. It stores the authentication token rather than your password, but naturally it still needs some level of protection.

Update: Corrected the GitHub URL.


Wayfarer (GitHub: yoshuawuyts/wayfarer, License: MIT, npm: wayfarer) by Yoshua Wuyts is a client-side router, a bit like react-router. Wayrarer is slightly different because it's a "method-less" router with an EventEmitter-inspired API and supports composition through mounting subrouters.

This is what the super-pretty ES6 syntax looks like:

const wayfarer = require('wayfarer')

const router = wayfarer('/404')

router.on('/', () => console.log('/'))  
router.on('/404', uri => console.log('404 %s not found', uri))  
router.on('/:user', (uri, param) => console.log('user is %s', param.user))

// => 'user is tobi' 

// => '404 /uh/oh not found' 

The combination of Wayfarer's API and fat arrow is very easy to follow, and the API should be easy to use with your other favourite client-side libraries.


libraries console node apps modules npm iojs

Node Roundup: TJ Steps Down, Node and io.js Performance, Cloud Commander, Blessed

Posted on .

TJ Steps Down

Timothy J Fontaine has stepped down as the leader of the Node project:

Given the strength of its community, I'm confident that Node.js is heading in the right direction. With that said, it's time for me to step back.

The formation of the Node.js Foundation couldn't have happened at a better time in the life of Node.js. I believe this will be the tipping point that cements Node's place in technology. Soon, the foundation will be announcing its first meeting, initial membership, and future plans for Node.js.

The announcement includes details about Julien Gilli's work on the project, who is paid as a full-time developer on Node itself:

Julien has been responsible for the last few releases of Node.js -- both the v0.10 and v0.12 branches.

Thanks to him, we were able to ship v0.12.0 with all our tests passing and on all of our supported platforms. This was the first Node.js release ever to have that feature.

There's also another post on the Node blog by Scott Hammond that reiterates the move towards the Node.js Foundation:

Under the aegis of the Foundation, the Node.js project is entering the next phase of maturity and adopting a model in which there is no BD or project lead. Instead, the technical direction of the project will be established by a technical steering committee run with an open governance model.

That all sounds promising, except most of us just want a Node that has ES6 features without flags and continued updates to the V8 core. Naturally that brings me to io.js which just hit version 2.0.1. This release updates libuv and V8, and has fixes for async-wrap, documentation, and some of the internal C++ in the src/ folder. And you may also remember that the io.js 2.0.x branch has enabled lots of ES6 features without flags.

Node and io.js Performance

Nick Harley sent in Performance Showdown: Node.js vs. io.js v2.0.0:

A 14.8% speedup from Node to the latest version of io.js - certainly worthy of note. If you’re looking at one of the latest generation of JS backend frameworks, it certainly pays to give io.js a look as out-of-the-box you get some rather impressive perf improvements. When running a cluster of VMs using the Node stack, depending on scale, that speedup may result in several fewer boxes needed and correspondingly less infrastructure costs - all for free.

Cloud Commander

Coderaiser sent in Cloud Commander (GitHub: coderaiser/cloudcmd, License: MIT, npm: cloudcmd), a Node app that's been under active development since 2012. It's a file manager that reminded me of a web version of Midnight Commander, and it bundles CodeMirror and Ace so you can edit code with it quite comfortably.

It's built with Express and Socket.IO, and I was pleased to see they're on Express 4.x. The documentation the homepage includes details on how to deploy it with a non-root user for Linux/iptables or nginx.

The web app has a console interface as well, so you can type commands rather than using the web GUI.

Blessed and Blessed-Contrib

A colleague kept telling me how good Blessed-Contrib was, and I've only briefly mentioned Blessed on DailyJS before so I wanted to mention it. The attached gif illustrates why. Blessed is a curses-like library, but it has a very high-level API that I find much easier to understand than most terminal GUI libraries.

However, the magic really happens when you get blessed-contrib:


I've been waiting for something like this for years but never found a high-level scripting language library good enough to make my 1980s Unix console UI fantasies come true. Now I can finally bring to life my W.O.P.R version of our status dashboard!