mirror of
https://github.com/shlinkio/shlink.git
synced 2025-03-20 23:22:39 +03:00
15 lines
466 B
Text
15 lines
466 B
Text
|
#!/usr/bin/env php
|
||
|
<?php
|
||
|
use Zend\Diactoros\ServerRequestFactory;
|
||
|
use Zend\Diactoros\Uri;
|
||
|
use Zend\Expressive\Application;
|
||
|
|
||
|
/** @var Application $app */
|
||
|
$app = include __DIR__ . '/../config/app.php';
|
||
|
|
||
|
$command = count($_SERVER['argv']) > 1 ? $_SERVER['argv'][1] : '';
|
||
|
$request = ServerRequestFactory::fromGlobals()
|
||
|
->withMethod('CLI')
|
||
|
->withUri(new Uri(sprintf('/%s', $command)));
|
||
|
$app->run($request);
|