Update worker.js

added possibility to change express middlewares