Add middlewares, favicon and put app in lib

Add the following middlewares :
- methodOverride
- expressSession
- serveStatic
- serveIndex
- errorhandler