Add the serve
command to Flarum.
This will allow you to start Flarum into the PHP development server via a simple command.
This package is made for developers, it should probably not be installed on production servers. Use at your own risks !
Use Bazaar or install manually:
composer require flagrow/serve
Enable the extension via the admin dashboard. You can then start the dev server from the Flarum root folder with:
php vendor/bin/flagrow serve
The command has the same options as the Laravel serve
command:
php vendor/bin/flagrow serve --host=0.0.0.0 --port=4000
You can check the help via:
php vendor/bin/flagrow help serve
This extension uses the flagrow/console package to provide non-standard commands in Flarum.
"Flagrow Console" is shown in the extension tab as well, but you don't have to enable it in order to use the serve
command.
See the Flagrow Console README to see what else is available if you enable it.
If Flarum is not yet installed or you can't enable the extension, you can also use the router script directly:
php -S 127.0.0.1:8000 vendor/flagrow/serve/src/server.php
We prefer to keep our work available to everyone. In order to do so we rely on voluntary contributions on Patreon.
If you discover a security vulnerability within Serve, please send an email to the Gravure team at [email protected]. All security vulnerabilities will be promptly addressed.
Please include as many details as possible. You can use php flarum info
to get the PHP, Flarum and extension versions installed.