Skip to content

Commit

Permalink
Merge branch 'master' of github.com:tamagokun/toby
Browse files Browse the repository at this point in the history
  • Loading branch information
tamagokun committed Mar 14, 2013
2 parents 839f34f + af612ef commit d690afa
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions README.md
Expand Up @@ -18,31 +18,40 @@ Toby works best with [Composer](http://getcomposer.org/). Add it to your `compos
"minimum-stability": "dev"
}
```
Install `composer install`
Autoload `require 'vendor/autoload.php';`

You can also load via PSR-0 by using `require 'toby.php';`
```sh
$ composer install
```

## Hello World

```php
<?php
# config.php

require 'vendor/autoload.php';

$app = new \Toby\Base();
$app->get('/',function() {
return "Hello World!";
return "<h1>Hello World!</h1>";
});
$app->run();
return $app->run();
?>
```

```sh
$ vendor/bin/rackem
$ open http://localhost:9393
```

## [Check out the manual](http://ripeworks.com/toby)

## What we have so far

- routing (`DELETE`,`GET`,`HEAD`,`OPTIONS`,`PATCH`,`POST`,`PUT`)
- route matching (`$app->get("/hello/:name");`)
- render templates and layouts
- currently supported: `php`,`mustache`,`markdown`,`haml`
- more to come!
- conditions and filters
- redirection
- halting
Expand Down

0 comments on commit d690afa

Please sign in to comment.