oops, forgot the 'options.' bit before 'env'
middleware usage fixed for express@4