Skip to content

Instantly share code, notes, and snippets.

@damiankloip
Created June 7, 2015 09:32
Show Gist options
  • Save damiankloip/2b3838d00e3094a6ba84 to your computer and use it in GitHub Desktop.
Save damiankloip/2b3838d00e3094a6ba84 to your computer and use it in GitHub Desktop.
diff --git a/index.php b/index.php
index 750dc28..314c482 100644
--- a/index.php
+++ b/index.php
@@ -13,7 +13,10 @@
$autoloader = require_once 'autoload.php';
-$kernel = new DrupalKernel('prod', $autoloader);
+// Get the environment.
+$env = getenv('DRUPAL_ENV') ?: 'prod';
+
+$kernel = new DrupalKernel($env, $autoloader);
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment