Skip to content

Instantly share code, notes, and snippets.

@Adroit11
Created January 19, 2019 12:33
Show Gist options
  • Save Adroit11/848ddffb80dc78834499386009f85959 to your computer and use it in GitHub Desktop.
Save Adroit11/848ddffb80dc78834499386009f85959 to your computer and use it in GitHub Desktop.
TDD in Slim Framework mini library demo
<?php
use \Psr\Http\Message\ServerRequestInterface as Request;
use \Psr\Http\Message\ResponseInterface as Response;
require '../vendor/autoload.php';
$app = new \Slim\App();
$app->get('/', function (Request $request, Response $response) {
$response->withStatus(200)->write("Welcome to the Adroit Library Demo.");
return $response;
});
$app->run();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment