Episode 4 - Writing Middleware in Koajs

Author: James Moore

In this episode we'll learn to write middleware, the foundational building block for Koajs and Expressjs.

Of course the best way to learn programming is to make stuff, so we'll build a "Session Management Middleware".

We'll start off writing a few tests using mocha and supertest , then we'll implement our Session Management Middleware first storing the session information in memory.

Next we'll take a quick look at RethinkDB , a cool new open source database, that we'll use to store our session information.

Lastly we'll refactor our middleware to save our session information using RethinkDB.

If you are unfamiliar with middleware or Koajs, please checkout my quick start screencast on those topics

Free Courses

Functional Concepts in JavaScript with Ramda

What's Ramda?

In this free mini-course, you'll learn about functional programming concepts like: map, filter, reduce, curry and function composition.

This is a great course for dipping your toes into Functional Programming.

Price:Free ($0)
Sign Up

Elm for Beginners

What's Elm, and why should I care?

It's an amazing language for writing web apps which have no runtime exceptions.

I'm pretty sure learning Elm will change the way you program And It's Free!

Price:Free ($0)
Sign Up