# Configuring Modes

**URL:** <https://discourse.slimframework.com/t/configuring-modes/489>\
**Category:** Questions\
**Created:** [July 9, 2016, 3:29pm UTC](https://discourse.slimframework.com/t/configuring-modes/489 "2016-07-09T15:29:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![enewbury](https://avatars.discourse-cdn.com/v4/letter/e/76d3ee/32.png) [@enewbury](https://discourse.slimframework.com/u/enewbury)\
**Post date:** [July 9, 2016, 3:29pm UTC](https://discourse.slimframework.com/t/configuring-modes/489/1 "2016-07-09T15:29:43Z")

</div>

Now that configureMode is gone from slim v3, how do you recommend we customize configuration settings for different modes, dev, production, etc?

---

<div class="post-metadata">

**Author:** ![TheLobos](https://avatars.discourse-cdn.com/v4/letter/t/e9bcb4/32.png) [@TheLobos](https://discourse.slimframework.com/u/TheLobos)\
**Post date:** [July 10, 2016, 2:00am UTC](https://discourse.slimframework.com/t/configuring-modes/489/2 "2016-07-10T02:00:52Z")

</div>

I guess it depends on how extensive your config changes are. Assuming you want to just change a few things like DB connection info, I would do the following (if someone knows a better way, please tell me as well):

At the start of settings.php, place a single variable like this:

```
$production = false; // or true, whatever you need

```

Then in your settings do the following:

```
'database' => [
        'driver' => 'mysql',
        'host' => 'localhost',
        'database' => $production ? "DBName_A" : "DBName_B",
        'username' => $production ? "DBUser_A" : "DBUser_B",
        'password' => $production ? "DBPass_A" : "DBPass_B";,
        'charset' => 'utf8',
        'collation' => 'utf8_unicode_ci',
        'prefix' => '',
    ],

```

etc. Quite easy and manageable IMHO.
