Example #1
0
 * @package putaspot
 * @author Niklas Lindblad
 */
/**
 * Introduce a web root constant for better relative path handling.
 */
define('WEB_ROOT', dirname(__FILE__));
require WEB_ROOT . '/../bootstrap.php';
$app = new Slim();
/**
 * Get the standard webpage.
 *
 * @author Niklas Lindblad
 */
$app->get('/', function () {
    View::renderPage('index', array());
});
/**
 * Get the mobile version.
 *
 * @author Niklas Lindblad
 */
$app->get('/m', function () {
    View::render('mobile', array());
});
/**
 * Get near by spots as JSON.
 *
 * @author Niklas Lindblad
 */
$app->get('/near.json', function () {