Last active
August 29, 2015 13:57
-
-
Save kimausloos/9652146 to your computer and use it in GitHub Desktop.
Dokku and Silex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "require": { | |
| "silex/silex": "~1.1" | |
| }, | |
| "extra": { | |
| "heroku": { | |
| "framework": "silex", | |
| "document-root": "web", | |
| "index-document": "index.php" | |
| } | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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