added connect dep, fix failing tests.
removed the  since it is is a reserved word for ES6, and it's future implementation does not match with the current use.
added missing use strict statement. wrapped the code into a global closure. fixed unescaped dot in regexs
removed try/catch block. try/catch block used as a logical operator is a anti pattern in JS. In this case, the try/catch was also calling next after response.end() causing errors (attempting to set a header after res.end). Exceptions throw are not HTTP status codes, so when they occur the script fails. Strict equallity is a good practice in JS and should always be used.
forgot to pass the existing error to next()