Skip to content

Latest commit

 

History

History
74 lines (48 loc) · 1.39 KB

README.md

File metadata and controls

74 lines (48 loc) · 1.39 KB

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.