implementing the code from http://timstermatic.github.io/blog/2013/08/17/a-simple-mvc-framework-with-node-and-express/