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 ofmodefromDEVELOPMENTtoPRODUCTION:{ "mode": "PRODUCTION" }The file changes the operating mode from development mode to production mode. For more information about the
admin.jsonfile, see AdminHttpApplication (admin.json).The value set in
admin.jsonoverrides any value set by theig.run.modeconfiguration 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.jsonas described in the Getting started, and configure thescanIntervalproperty of the main Router. -
To prevent individual routes from being reloaded, configure the
scanIntervalof 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://ig.example.com:8080/openig/studio.