create minify middleware