Fix the web server to work in both heroku and local environments