io.vertx.ext.web.common

## Interface WebEnvironment

-     public interface WebEnvironment

  Utility API to verify which environment is the web application running. The utility will check initially for the existence of a system property under the name `vertx.mode`, if there is no such property then it will look under the environment variables under the name `VERTX_MODE`. This value will be then used when the API is invoked. By itself this utility will not affect the behavior of your application, however you can use it to simplify your handlers, e.g.: When the development mode is active you can log more information or disable caches.
  Author:
    Paulo Lopes

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `ENV_VARIABLE_NAME`
    `static String` | `SYSTEM_PROPERTY_NAME`

  - ### Method Summary

    All Methods Static Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static boolean` | `development()` Will return true if the mode is not null and equals ignoring case the string "dev"
    `static String` | `mode()` The current mode from the system properties with fallback to environment variables

- - ### Field Detail

    - #### SYSTEM_PROPERTY_NAME

          static final String SYSTEM_PROPERTY_NAME

      See Also:
        Constant Field Values

    - #### ENV_VARIABLE_NAME

          static final String ENV_VARIABLE_NAME

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### development

          static boolean development()

      Will return true if the mode is not null and equals ignoring case the string "dev"
      Returns:
        always boolean

    - #### mode

          static String mode()

      The current mode from the system properties with fallback to environment variables
      Returns:
        String with mode value or null

Copyright © 2019 Eclipse. All rights reserved.