Skip to content

guoyu07/swoft-devtool

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

swoft devtool

Dev tool for swoft

Install

  • composer command
composer require swoft/devtool

Quick start

  1. Add http middleware in config/beans/base.php
'serverDispatcher' => [
      'middlewares' => [
          // ...
          \Swoft\Devtool\Middleware\DevToolMiddleware::class,
      ]
  ],
  1. Some optional config for devtool(in config/properties/app.php).
'devtool' => [
    'enable' => true,
    'logEventToConsole' => true,
    'logHttpRequestToConsole' => true,
],
  1. Publish static assets to public dir.
php bin/swoft dev:publish swoft/devtool
// -f will delete old assets.
php bin/swoft dev:publish swoft/devtool -f
  1. Now, you can access HOST:PORT/__devtool by browser. e.g http://127.0.0.1:9088/__devtool

  2. If you see the following screen, you have successfully installed

image

Question

If you cannot access the address HOST:PORT/__devtool

  • Ensure your static assets is can accessed and assets is publish successful.
  • Ensure that the server was restarted after updating the package

Notice

Opening devTool will have some impact on server operation, please turn it off during stress test.

Document

Please see document site

Unit testing

phpunit

LICENSE

The Component is open-sourced software licensed under the Apache license.

About

🛠️ Dev tool for Swoft

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 45.3%
  • Vue 33.5%
  • JavaScript 20.7%
  • Other 0.5%