A list of environment variables supported by the CodeProber server.

During development, it was unfortunately not well-defined what functionality should be handled as an environment variable vs a system property.

If you would like to be able to control something as an environment variable but it currently is a system property, or vice versa, pleae open an issue or pull request.

Common variables

These are common, may be of interest to most developers.

Key Default Value Description
PORT 8000 The port to serve HTML/JS/websocket request on. This is the port you visit in your browser, e.g the ‘8000’ in ‘http://localhost:8000’. Set to 0 to automatically allocate a free port.
WEB_SERVER_PORT null The port for for HTML/JS (non-websocket) requests. If not set, PORT will be used.
WEBSOCKET_SERVER_PORT null The port for websocket requests. This isn’t visible to the user, and normally doesn’t need to be changed. If not set, PORT will be used. This can be set to http to delegate all websocket traffic to normal HTTP requests instead. This is worse for performance, but can be necessary if hosting CodeProber in a place where websocket doesn’t work as expected.
PERMIT_REMOTE_CONNECTIONS false Whether or not to permit unauthenticated remote (non-local) connections to the server. Most compilers/analyzers read/write files on your computer based on user input. By allowing remote connections, you open up a potential vulnerability. Only set to true when on a trusted network, or if running inside a sandboxed environment.
DISABLE_VERISON_CHECKER_BY_DEFAULT false If true, disable the version checker that displays “Update Available” in the bottom right corner of the CodeProber client.
CHANGE_BUFFER_TIME 0 Buffer changes in the CodeProber client for the specified number of milliseconds before asking the server to recompute probes.
QUERY_PROBE_OUTPUT_LIMIT 100 Limit number of search results displayed in a search probe.

Uncommon variables

Highly specialized and/or legacy properties, should generally be avoided. If you look in the codebase you may find more environment variables that are not in this list. They are even more specialized/legacy and should definitely be avoided.

Key Default Value Description
SESSION_LOGGER_DATA_LIMIT_KB 32768 Make the session logging feature (see cpr.session_logger_dir in system_properties) stop writing files once they get near this limit in size. This is to avoid generating very large individual files.
WEB_RESOURCES_OVERRIDE null A file path that should be used to serve web resources (e.g HTML/JS/etc). If null, then resources are read from the classpath. Setting this can be benificial during development of the code prober tool itself (set it to client/public/), but there is very little point in setting it for normal tool users.
DEBUG_REQUESTS false If true, log all incoming http requests.
SIMULATED_SLOWDOWN_MS 0 Slow down all requests by this amount of milliseconds, to simulate an overloaded server and/or bad network conditions.