Skip to content

Instantly share code, notes, and snippets.

@jsmarkus
Created October 12, 2011 06:49
Show Gist options
  • Save jsmarkus/1280471 to your computer and use it in GitHub Desktop.
Save jsmarkus/1280471 to your computer and use it in GitHub Desktop.
if express was in PHP
<?php
//define simple route
$app->get('/', function ($req, $res, $next) {
$res->render('main.tpl', array('title'=>'Hello world'));
});
//mount class
$app->mount('MyController', '/myctrl');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment