tlmarker1968

Untitled

Jan 11th, 2020
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.38 KB | None | 0 0
  1. <?php
  2. use Psr\Http\Message\ResponseInterface as Response;
  3. use Psr\Http\Message\ServerRequestInterface as Request;
  4. use Slim\Factory\AppFactory;
  5.  
  6. require __DIR__ . '/../vendor/autoload.php';
  7.  
  8. $app = AppFactory::create();
  9.  
  10. $app->get('/', function (Request $request, Response $response, $args) {
  11.     $response->getBody()->write("Hello world!");
  12.     return $response;
  13. });
  14.  
  15. $app->run();
Advertisement
Add Comment
Please, Sign In to add comment