This repository has been archived on 2024-06-26. You can view files and clone it, but cannot push or open issues or pull requests.
sakura/libraries/Console/Command/ServeCommand.php

24 lines
442 B
PHP
Raw Normal View History

2016-02-19 21:49:00 +00:00
<?php
/**
* Holds the serve command controller.
2016-02-20 11:20:58 +00:00
*
2016-02-19 21:49:00 +00:00
* @package Sakura
*/
namespace Sakura\Console\Command;
use CLIFramework\Command;
class ServeCommand extends Command
{
public function brief()
{
return 'Sets up a local development server.';
}
public function execute()
{
2016-02-20 11:20:58 +00:00
exec(PHP_BINDIR . '/php -S localhost:8000 -t ' . addslashes(ROOT . 'public/') . ' ' . addslashes(ROOT . 'server.php'));
2016-02-19 21:49:00 +00:00
}
}