git clone [email protected]:lagomus/lec-admin.git # Or equivalent with HTTPS URL
npm install
npm start
Create the configuration file in the theme directory copying from the provided sample.
cp .env.sample .env
In the new .env file, set the API endpoint.
REACT_APP_API_BASE_PATH=https://the-core-api-domain
# Login strategy ("default" | "gravitee"). Defaults to "default".
REACT_APP_STRATEGY_LOGIN_TYPE=
# Gravitee client_id. Required if REACT_APP_STRATEGY_LOGIN_TYPE is gravitee.
REACT_APP_GREVITEE_LOGIN_CLIENT_ID=
# Gravitee response_type (only works with token type). Required if REACT_APP_STRATEGY_LOGIN_TYPE is gravitee.
REACT_APP_GRAVITEE_LOGIN_RESPONSE_TYPE=
# Gravitee redirect_uri (The path only accepts '/auth' for correct operation with the application). Required if REACT_APP_STRATEGY_LOGIN_TYPE is gravitee.
REACT_APP_GRAVITEE_LOGIN_REDIRECT_URI=http://example.com/auth
# Gravite URI to login form. Required if REACT_APP_STRATEGY_LOGIN_TYPE is gravitee.
REACT_APP_GRAVITEE_LOGIN_URI=
# Default session TTL (in Minutes, not required)
# Used as session life time when the login service used does not returns expiration time. If expiration time is returned by the login, this value is ignored.
# If the expiration time is not returned by the login and this variable is not set, the session TTL is infinity.
REACT_APP_SESSION_TTL=5
# CMS editor url
REACT_APP_CMS_EDITOR_URL=
To use Gravitee login in local environment, use:
REACT_APP_API_BASE_PATH=http://localhost:3000
REACT_APP_STRATEGY_LOGIN_TYPE=gravitee
REACT_APP_GREVITEE_LOGIN_CLIENT_ID=dd4aa4f8-4ad4-4de5-8aa4-f84ad45de5d6
REACT_APP_GRAVITEE_LOGIN_RESPONSE_TYPE=token
REACT_APP_GRAVITEE_LOGIN_REDIRECT_URI=http://localhost:3000/auth
REACT_APP_GRAVITEE_LOGIN_URI=https://am.lagom.us/lagom-us/oauth/authorize
REACT_APP_GRAVITEE_LOGOUT_URI=https://am.lagom.us/lagom-us/logout
REACT_APP_CMS_EDITOR_URL=http://localhost:3000/_edit