Skip to content

Instantly share code, notes, and snippets.

@kimausloos
Last active August 29, 2015 13:57
Show Gist options
  • Select an option

  • Save kimausloos/9652146 to your computer and use it in GitHub Desktop.

Select an option

Save kimausloos/9652146 to your computer and use it in GitHub Desktop.
Dokku and Silex
{
"require": {
"silex/silex": "~1.1"
},
"extra": {
"heroku": {
"framework": "silex",
"document-root": "web",
"index-document": "index.php"
}
}
}
<?php
// web/index.php
use Symfony\Component\HttpFoundation\Request;
require_once __DIR__.'/../vendor/autoload.php';
$app = new Silex\Application();
$app->get('/', function (Request $request) use ($app) {
return $request->server->get("HTTP_X_FORWARDED_FOR");
});
$app->run();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment