JSFoo 2013

All about being creative with JavaScript

Pankaj Bhageria


Building your own express js framework from scratch

Submitted Aug 18, 2013

Express is a framework to build web apps in Node.

This workshop aims at following

1) If you dont know nodejs and expressjs , its a cool way to learn it.

2)If you already know node and express, you will help you understand the internals express js framework.

3) You would be able to hack/extend the framework, when you need to customize something.

4) It gives you the confidence of hacking into the modules/plugins you use. NPM module and libraries would no longer be black boxes.

5) It will be fun


We would start from scratch and build our own Expressjs framework.

Beginning with a simple server which just gives a hardcoded response, we will add small features one at time. By the end we would have built a framework which is close to Expressjs.

Our focus will revolve around building the following components of express js. Even if you don’t understand the below list, its perfectly fine. You would be still able to completely understand whats going on.

  • request
  • response
  • app(use, get, set, engine, param, render, route, listen etc)
  • middleware(static,logger, bodyParser, methodOverride, session etc)
  • router

By the end of it you would be surprised, to see that you have built a complete framework.


Laptop with node js installed

Some brains :)

Speaker bio

Name : Pankaj Bhageria, Lead at Sumeru Software Solutions.

Summary: RubyConf 2011 speaker, passionate about open source, created several libraries, developer, ROR, Nodejs, Meditator, loves to learn and teach.


Passionate about open source and JavaScript, I have been working on Node js and client side frameworks for more than a year now. Beginning with backbone, I have explored many MVC frameworks including ember, angular and knockout. I have also build few of my own libraries in JavaScript(see below).

I was a speaker at RubyConf2011((http://rubyconfindia.org/2011/talks.html). I have been working on open source since 2006 beginning with php, then Rails and now JS. I have worked on projects of various sizes, from one man army(from BA, to PM to developer to tester), to larger projects involving multiple people. I love teaching and have given multiple trainings on jQuery, Rails and Js(node, knockout). I believe that Spirituality and Technology can change the world and my dream is to create a software which will be used by the whole world. I am a regular Meditator and I love to help and meet new people, to learn and to teach.

Open Source Contributions

1) wherejs(wherejs.org): Its a library to search(deep search) in javascript arrays with a mongodb like interface.

2) selectjs(selectjs.org) : A javascript library to map and transfrom json object/arrays

3) dharmajs(https://github.com/panbhag/dharmajs): A Javascript SPA framework built around Knockout and sammy

4) naradjs(https://github.com/panbhag/narad): A pusher like nodejs implementation built on top of socket.io



{{ gettext('Login to leave a comment') }}

{{ gettext('Post a comment…') }}
{{ gettext('New comment') }}
{{ formTitle }}

{{ errorMsg }}

{{ gettext('No comments posted yet') }}