GWA environment variables
This section describes environment variables relevant to Genero Web Application (GWA) deployment and configuration.
BROWSER
To specify a different browser to the default one, use the BROWSER environment
variable and set it to either chrome, firefox,
safari, edge, or none. Setting
BROWSER to none does not invoke a particular browser; instead, a
message appears on the command line like this:
Copy the following URL into your browser: http://localhost:9101/d/r/index.html
For example, BROWSER=chrome launches Chrome, BROWSER=firefox
launches Firefox, BROWSER=safari launches Safari, and BROWSER=edge
launches Edge.
To see how BROWSER interacts with the GWA_TARGET variable, go
to How GWA_TARGET and BROWSER interact.
GWA_TARGET
The GWA_TARGET environment variable defines the target platform or environment
for the GWA app. It is used to specify where and how the GWA app should be launched.
| Value | Description |
|---|---|
simulator |
Starts the GWA app in Safari Mobile in an open iOS Simulator (macOS only). Prerequisite: Xcode must be installed. |
emulator |
Starts the GWA app in the default browser of an open Android Emulator. Prerequisite: Android SDK must be installed and commands like adb and emulator must be in the path. You can specify the browser using the BROWSER variable (for example, BROWSER=chrome or BROWSER=firefox). |
android |
Starts the GWA app in the default browser of a USB-connected Android device. Prerequisites: Same as for emulator, plus the phone must be in developer mode and all interactive USB connection dialogs about allowing debugging must be accepted. |
To see how GWA_TARGET interacts with the BROWSER variable, go to
How GWA_TARGET and BROWSER interact.
How GWA_TARGET and BROWSER interact
The GWA_TARGET and BROWSER environment variables can be used together to control where and how the GWA app is launched. The following table summarizes their combined behavior:
| GWA_TARGET | BROWSER | Result |
|---|---|---|
| (not set) | chrome | Launches Chrome on your local workstation. |
| android | (not set) | Launches the default browser on the connected Android device. |
| android | chrome | Launches Chrome on the connected Android device (if installed). |
| emulator | (not set) | Launches the default browser on the Android Emulator. |
| emulator | firefox | Launches Firefox on the Android Emulator (if installed). |
| simulator | (any) | Always launches Safari Mobile on the iOS Simulator. The BROWSER setting is ignored. |
If BROWSER is not set, the default browser for the target platform is used. When GWA_TARGET is not set, the application runs on your local workstation.