Skip to main contentCúram UI Addon Development Environment

Environment variables

The following environment variables are available for the development environment.

Basic configuration

CLIENT_DIR

Specifies the location of the webclient directory in the development installation. This value is used to test the integration of components with custom UIM or VIM pages in Cúram.

CLIENT_DIR=<CLIENT_DIR> 

Where CLIENT_DIR is the location of the webclient directory in the Java development environment.

RELATIVE_PATH_TO_BUNDLE

(Mandatory) Specifies the location of the compiled JavaScript relative to the server.

RELATIVE_PATH_TO_BUNDLE=CDEJ/jscript/SPMUIComponents/

CUSTOM_COMPONENT_NAME

Specifies the location of the web client component to copy the compiled JavaScript to during deployment. For example:

CUSTOM_COMPONENT_NAME=custom

If omitted, the default value ‘custom’ is used.

GRAPHQL_SERVER_URL

Specifies the relative location for the GraphQL server. For example, the following value sets the full URL for the GrpahQL server to https://<server>:<port>/Rest/graphql. If this value if not set, a default value of /Rest/graphql is used.

GRAPHQL_SERVER_URL=/Rest/graphql

Where server is the domain name or IP address of the server and port is the port number for the application server.

Security Configuration

If you have enabled Cross-Site Request Forgery (CSRF) protection in Cúram, you must set the following environment variables for production (.env). For more information about configuring CSRF in a React environment, see Enabling Cross-Site Request Forgery (CSRF) protection for Universal Access.

CSRF_TOKEN_ENPOINT

Specifies the REST endpoint that generates a security token to be sent with each GraphQL HTTP request. Set the following value:

CSRF_TOKEN_ENPOINT=/Rest/v1/csrf/tokens

CSRF_TOKEN_REQUEST_HEADER

Specifies the custom HTTP request header to be sent with each GraphQL request. It is also used to get the security token from the response to the REST endpoint used to generate the token. Set the following value:

CSRF_TOKEN_REQUEST_HEADER=X-IBM-SPM-CSRF