Skip to content

Instantly share code, notes, and snippets.

@nopolabs
Last active December 15, 2015 22:09
Show Gist options
  • Save nopolabs/5331455 to your computer and use it in GitHub Desktop.
Save nopolabs/5331455 to your computer and use it in GitHub Desktop.
composer.json
---
{
"require": {
"silex/silex": "1.0.*@dev"
},
"autoload": { "psr-0": { "App": "./app" } }
}
web/index.php
---
<?php
require_once __DIR__.'/../vendor/autoload.php';
$app = new Silex\Application();
$app->get('/hello/{name}', function ($name) use ($app) {
return 'Hello '.$app->escape($name);
});
$app->run();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment