Switching From Development Mode to Production Mode
IG operates in development mode and production mode, as defined inDevelopment Mode and Production Mode.
After installation, IG is by default in production mode. While you evaluate IG or develop routes, it can be helpful to switch to development mode as described in Switching from Production Mode to Development Mode. However, after deployment it is essential to switch back to production mode to prevent unwanted changes to the configuration.
-
In
$HOME/.openig/config/admin.json
(on Windows,appdata\OpenIG\config
), change the value ofmode
fromDEVELOPMENT
toPRODUCTION
:{ "mode": "PRODUCTION" }
The file changes the operating mode from development mode to production mode. For more information about the
admin.json
file, see AdminHttpApplication (admin.json).The value set in
admin.json
overrides any value set by theig.run.mode
configuration token when it is used in an environment variable or system property. For information aboutig.run.mode
, see Configuration Tokens. -
(Optional) Prevent routes from being reloaded after startup:
-
To prevent all routes in the configuration from being reloaded, add a
config.json
as described in the Getting Started, and configure thescanInterval
property of the main Router. -
To prevent individual routes from being reloaded, configure the
scanInterval
of the routers in those routes.{ "type": "Router", "config": { "scanInterval": "disabled" } }
For more information, see Router.
-
-
Restart IG.
When IG starts up, the route endpoints are not displayed in the logs, and are not available. You can’t access Studio on http://openig.example.com:8080/openig/studio.