Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Abzu CircleCI

Stop place register frontend. Uses stop place register backend tiamat's graphQL API

The app is built on top of Create React App.

Production

In order to build the webpack bundle and run the application, use

npm run build && npm run prod

Configuration

We use node-convict for config: config/convict.js

  • TIAMAT_BASE_URL : Where to find tiamat
  • ENDPOINTBASE : Where th application resides, in development defaulting to / but in the test environment /admin/nsr/

You can serve a config file and provide a CONFIG_URL env to let node-convict do this for you.

Development

To run Abzu for development, simply do:

npm install
npm start

Note: This will launch the application with hot reload enabled.

Default port in development is 9000. This can be overrided by setting the environment variable port (notice lower case).

To override timatBaseURL (GraphQL endpoint), set TIAMAT_BASE_URL as environment variables, e.g.

TIAMAT_BASE_URL=https://api.dev.entur.org/stop_places/1.0/graphql port=9000 NODE_ENV=development node server.js

Testing

Uses Jest to test unit and reducer testing

npm test

Authentication

Uses Keycloak to authenticate user and read JWT, set auth-server-url:

AUTH_SERVER_URL=https://www-test.entur.org/auth port=9000 NODE_ENV=development node server.js

Themes

Default theme is found in ./config/default.

Add custom theme

  • Create new directory: ./config/themes/{YOUR_THEME_NAME}
  • Add logo.png to ./config/themes/{YOUR_THEME_NAME}
  • Add index.js with custom fyles (cf. defaultTheme.js)
  • Set process.env.REACT_APP_THEME={YOUR_THEME_NAME}

This is WIP.