Access ENV variables in Transformation/Middleware

How may i use Environmental variable in the server on the Transformation and Middleware?