© Ecky Putrady 2018
Ecky PutradyPractical Web Development with Haskellhttps://doi.org/10.1007/978-1-4842-3739-7_10

10. Configuration

Ecky Putrady1 
(1)
Singapore, Singapore, Singapore
 

When building a web application, there’s a good chance you will need to deploy it to multiple environments. For example, besides the production environment, you might have a QA environment for the quality assurance process. The database you connect to in a production environment will have a different host and credential than the one in a QA environment. For this reason, you want your application to read the necessary configuration at runtime.

There are multiple ways to get these configuration values:
  1. 1.

    Environment variables

     
  2. 2.

    Files

     
  3. 3.

    Centralized configuration server

     

Get Practical Web Development with Haskell: Master the Essential Skills to Build Fast and Scalable Web Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.