configure from environment in a more idiomatic way

Flask has some clever configuration magic. Make more use of it.