Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once "app.class.php";
- $app = new App;
- // home screen
- $app->get('/', function($res) {
- $res->send("welcome! :-)");
- });
- // posts
- $app->get('/post/(?P<perma>.*)', function($req) {
- $req->send("showing post with permalink " . $req->params['perma']);
- });
- ?>
Add Comment
Please, Sign In to add comment