mainlycode/health-bundle

Symfony 扩展包,用于为您的应用程序添加 /health 端点

安装量: 1,744

依赖关系: 0

建议者: 0

安全性: 0

星标: 0

关注者: 2

分支: 1

开放问题: 1

类型:symfony-bundle

0.4.0 2024-06-18 08:43 UTC

This package is auto-updated.

Last update: 2024-08-28 13:23:45 UTC


README

Symfony 扩展包,用于为您的应用程序添加 /health 端点

安装

使用 Composer 安装包

composer require mainlycode/health-bundle

在应用程序中注册包 (config/bundles.php)

return [
    /** your other bundles */
    MainlyCode\HealthBundle\HealthBundle::class => ['all' => true],
];

要向应用程序添加路由,请在 config/routing.yaml 中添加以下内容

health:
    resource: '@HealthBundle/config/routing.yaml'

或者如果您正在使用 PHP 导入路由

// config/routes.php
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;

return function (RoutingConfigurator $routes) {
    $routes->import('@HealthBundle/config/routing.yaml');
};