update middleware function to append to existing middlewares
Merge pull request #279 from edeustace/fix/grunt-server

update middleware function to append to existing middlewares