Corrected the way to access environment variables in javascript.