Node In One Week

By Ev Bogue

Learn the basics of programming in Node.js in one week.

Node In One Week is a work in progress. 33 out of 40 chapters are written. When I finish the last chapter, the price will go up to $35. Buy now and save $10.

The last time I was in a physical bookstore, I looked for a decent book on learning to program in JavaScript with Node.js. I couldn't find one.

There was only one book on the shelf, and it covered how Node worked in a version (0.8.4 or something?) from 2011. 2011 was more than five years ago now! Node was a baby back then, now Node is in version 7.2.0. A lot has changed in five years.

Reading that ancient Node book for a moment in the physical bookstore, it became obvious to me that while Node is one of the most useful and popular programming tools in the world, there was also a simultaneous dirth of up-to-date tools to learn how to program with Node.

Node In One Week bridges the information gap for people who are beginning to learn to program with Node. In the book we'll cover how to build sophisticated programs with Node's many modules.

Why learn Node?

Node is the most useful programming tool in the world because it allows you to put together JavaScript programs from many tiny (and in some cases, big) modules that allow you to build programs based on other people's programs. This programming approach has huge benefits, because you don't have to reinvent the wheel from scratch every time you want to develop a program.

Because Node uses JavaScript to create applications, you can also bundle your applications into modern browsers -- a technique that is only available to Node programmers.

In Node In One Week you'll learn how to put together programs using the modules built into Node, as well as third-party modules available in the larger Node ecosystem.

Table of contents

These are the chapters included in Node In One Week with brief descriptions of what is contained in each chapter. There are 33 chapters written right now. Completed chapters are marked with a (✓). I'm going to write seven more chapters. When there are 40 chapters, the price of Node In One Week will go up to $35

Intro to Node In One Week (✓)

A brief introduction to what will be covered in the book

Install the latest Node (✓)

How to install the latest version of Node

n (✓)

How to control your Node version with the Node module n

npm init (✓)

How to init a new package.json file using npm

npm install (✓)

How to use npm to install Node modules

require node modules (✓)

How to require node modules so you can use the modules within your program

Hello World in Node (✓)

How to write a simple 'Hello World' web server using the http module

Writing files in Node (✓)

How to write to a file in your file system using the fs module

Reading files in Node (✓)

How to read files on your file system using the fs module

Parsing markdown (✓)

How to parse a markdown file on your file system using the marked and fs modules

Using variables for configuration options (✓)

How to use JavaScript variables as application-wide configuration options in your Node application

Choosing a static web server (✓)

How to choose from a wide selection of static web servers available in the Node ecosystem

Write a static web server with 'ecstatic' (✓)

How to write a simple static web server with the ecstatic module

Launch a static web server with 'http-server' (✓)

How to launch a pre-configured web server with the http-server module

Choosing a web framework (✓)

How to choose a web framework from Node's many available web frameworks, including koa and express

Hello World with Koa (✓)

How to write a 'Hello World' application using the koa web framework

Hello World with Express (✓)

How to write a 'Hello World' application using the express web framework

Static with Koa (✓)

How to serve static files using the koa-static module and the koa web framework

Static with Express (✓)

How to serve static files using the static web server built into express

An introduction to Hyperscript (✓)

How to write a simple real-time website in hyperscript

Simplify Hyperscript with hyperscript-helpers (✓)

How to simplify the hyperscript syntax with hyperscript-helpers

Loading a stylesheet in Hyperscript (✓)

How to load a stylesheet into a hyperscript web application

Make a basic static website generator with Hyperscript (✓)

How to code a basic static website generator with hyperscript

Choosing a templating engine (✓)

How to choose a template engine from Node's many templating options

The basics of Jade (✓)

How to render a static website using the jade command line tool while learning the basics of jade templating

Advanced Jade techniques (✓)

How to do more advanced templating actions with jade

Hello World with Metalsmith (✓)

How to create a simple blog with metalsmith

Serve your blog with Koa (✓)

How to serve your generated blog with koa-static and koa

Metalsmith layouts (✓)

How to create layouts for your blog using jade

Metalsmith collections and permalinks (✓)

How to create collections and permalinks with metalsmith-collections and metalsmith-permalinks

Metalsmith RSS (✓)

How to implement an rss feed in your metalsmith blog

Rendering dates with Moment (✓)

How to render human-readable dates on your metalsmith blog with moment

Outro ( )

Pulling it all together. This is what you learned.

Node In One Week is a digital book for people who are interested in learning how to program in Node using a simple modern approach to programming. I've condensed my experience learning to program using Node over the past four years into concise chapters that guide you towards the end goal of creating a deployable blog that you wrote yourself using Node. Once you've mastered the chapters in Node In One Week, you'll have the understanding you need to develop on more complicated Node applications, because you'll have a solid understanding of the basics of programming using Node.

Who should buy this book?

  • Beginning programmers who want to learn how to program in Node
  • Programmers coming from a background in another language
  • Programmers who've been on long vacations and need a knowledge update
  • Anyone who wants to make the leap from oldskool programming to modern JavaScript
  • Programmers who've been coding in Node for awhile, but need a refresher

Who shouldn't buy this book?

  • Node geniuses and Ryan Dahl

If you have any questions before or after buying, give me a shout at ev@evbogue.com or on Scuttlebot -- the distributed social network built in Node.

Node In One Week

Node In One Week is a work in progress. 33 out of 40 chapters are written. When I finish the last chapter, the price will go up to $35. Buy now and save $10.

The button above will take you to Paypal, where you can complete your purchase with a debit or credit card. Once payment is completed, you'll receive an email that contains a secret link to the book. If you want to pay with Bitcoin, contact me.

Ev Bogue