changed server file to work for production and development