Skip to content
Front end for Stop place register ("Holdeplassregisteret") Tiamat
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
actions
components ROR-601 Removed tariff zone editing feature from web interface. Feb 25, 2019
config
containers
graphql
localization
modelUtils
models
plugins
reducers
roles NRP-2066 Better check of user privilegies for allowing/disallowing cr… Nov 30, 2017
routes NRP-2066 basic implementation of editing/creating a new group of stop… Nov 17, 2017
selectors NRP-2212 additional fixes to mapping of child of stop place name Sep 27, 2017
singletons
static ROR-577 Fix test Dec 14, 2018
store
styles NRP-2019 add raven and sentry configuration for handling crashes catc… Oct 2, 2017
test ROR-483 Update snapshots with adjacentSites Sep 4, 2018
utils
.babelrc stage-0 preset was obviously there for a reason Oct 7, 2016
.gitignore
.jshintrc
Dockerfile
LICENSE.txt
README.md
graphql.config.json NRP-1998 Change from https://www-test.entur.org/api/ to https://api-t… Sep 20, 2017
index.js
nightwatch.json
package-lock.json
package.json
server.js ROR-583 Migrating to entur sentry Jan 7, 2019
webpack.dev.config.js NRP-2067 make theme in Abzu configurable + add new entur theme as def… Oct 9, 2017
webpack.prod.config.js
yarn.lock NRP-2239 render children stop place markers as expired if parent stop… Oct 4, 2017

README.md

Abzu CircleCI

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

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 run dev

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

Default port is 8988. 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-test.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.THEME={YOUR_THEME_NAME}

This is WIP.

Webpack

Webpack uses webpack.dev.config.js for development and webpack.prod.config.js for production code. Correct config is chosen based on NODE_ENV.

Webpack produces public/bundle which is the entire application rendered by the server. In development this file is emitted from webpack through webpack-dev-middleware over a connect server. No file is written to disk. These facilities hot-reload.

Troubleshooting

Issues with pngquant on linux

Error message:

error while loading shared libraries: libpng12.so.0

Cause

Ubuntu has, at the time of writing, libpng 16, not libpng 12.

Workaround:

wget -q -O /tmp/libpng12.deb http://mirrors.kernel.org/ubuntu/pool/main/libp/libpng/libpng12-0_1.2.54-1ubuntu1_amd64.deb \
  && sudo dpkg -i /tmp/libpng12.deb \
  && rm /tmp/libpng12.deb
You can’t perform that action at this time.