process.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. /**
  3. * This file is part of webman.
  4. *
  5. * Licensed under The MIT License
  6. * For full copyright and license information, please see the MIT-LICENSE.txt
  7. * Redistributions of files must retain the above copyright notice.
  8. *
  9. * @author walkor<walkor@workerman.net>
  10. * @copyright walkor<walkor@workerman.net>
  11. * @link http://www.workerman.net/
  12. * @license http://www.opensource.org/licenses/mit-license.php MIT License
  13. */
  14. return [
  15. // File update detection and automatic reload
  16. 'monitor' => [
  17. 'handler' => process\Monitor::class,
  18. 'reloadable' => false,
  19. 'constructor' => [
  20. // Monitor these directories
  21. 'monitor_dir' => [
  22. app_path(),
  23. config_path(),
  24. base_path() . '/process',
  25. base_path() . '/support',
  26. base_path() . '/resource',
  27. base_path() . '/.env',
  28. ],
  29. // Files with these suffixes will be monitored
  30. 'monitor_extensions' => [
  31. 'php', 'html', 'htm', 'env'
  32. ]
  33. ]
  34. ],
  35. 'websocket' => [
  36. 'handler' => process\TcpServer::class,
  37. 'listen' => 'websocket://0.0.0.0:8888',
  38. 'count' => 1,
  39. ],
  40. 'task' => [
  41. 'handler' => process\Task::class,
  42. ],
  43. // 'log_cleaner' => [
  44. // 'handler' => process\WorkerLogCleaner::class,
  45. // ]
  46. ];
  47. // see [https://www.workerman.net/doc/webman/process.html](https://www.workerman.net/doc/webman/process.html)